Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

错了几个字 #12

Closed
17337162621254271304 opened this issue Apr 28, 2019 · 4 comments
Closed

错了几个字 #12

17337162621254271304 opened this issue Apr 28, 2019 · 4 comments

Comments

@17337162621254271304
Copy link

def enter(self):
# 刚方法将在进入上下文时调用
return self

该方法将在进入上下文时调用 错了个字

还有前面几节举的例子, 列表的命名用 'l'(小写字母l), 看了半天, 觉得不应该啊..... 哈哈

@piglei
Copy link
Owner

piglei commented Apr 28, 2019

感谢反馈,我晚点会修复下,你方便的话,也可以帮忙提个 PR 修下错字 :)

关于列表命名是这样的,有时候要虚拟一个片段代码作为样例来表达想法,但是缺少一种真实情景,所以其实起一些有意义的名字反而会增加读者的理解成本,因为这个例子里面,压根就没有所谓“情景”。

另外单字母变量也不是完全不行啦,在当前 context 比较小的情况下,特别短的名字也是完全可以接受的。(尤其是在我写了一段时间 Go 以后..)哈哈哈

@17337162621254271304
Copy link
Author

17337162621254271304 commented Apr 28, 2019 via email

@piglei piglei closed this as completed in e26f46e Apr 29, 2019
@piglei
Copy link
Owner

piglei commented Apr 29, 2019

我早上顺手直接 fix 了,以后如果发现错字可以直接提 PR。
公众号没开赞赏,是因为开的晚,之前还没发够三篇原创,现在够了 😅。欢迎继续关注。

@17337162621254271304
Copy link
Author

17337162621254271304 commented Apr 29, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants