[reviewcode] 那些基础comments

多次提醒我,为变量取个合适的名字, so cute person:
Not a big deal, but try using variable names better than my_sa

每个参数一行好么 菇凉?

 def test_share_path_and_user_unicode(self):
            self.assertEquals(user[1].decode('utf-8'), s_perms[ix]['trustee'][u'name'],
                                'user {0} not found in {1} positon of acl'.format(user[1], ix))
can you put each argument on its own line for readability and line up the continuation lines after the opening parenthesis?

这样写for ok?

fileslist = {file_.encode('utf-8') + fn_suffix for file_ in filenames}

不要在代码里用 hard-coded 好么? 用 constant

user_name = self.testOptions.s_test_users[13][1].decode('utf-8')

判断 是否为 unicode

isinstance(s, unicode)

判断是否为ascii, 返回true 为english, 返回false 为其他字符

ss = all(ord(c)<128 for c in s)

取列表后2位,赋值给2个变量
s_test_users[13][0] zoon
s_test_users[13][1] username
s_test_users[13][2] password

user_name, password = self.testOptions.s_test_users[13][1:]

一些缩写

LGTM looks good to me 朕知道了 代码已经过 review,可以合并
w.s. whitespace 我多了个无意义的空白行,我只是想让2个函数分开些,毕竟今天七夕,不想你们挨太近~
JFYR just for your reference

posted @ 2019-08-07 10:54  vivi~  阅读(169)  评论(0编辑  收藏  举报