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

113.md 问题 #106

Closed
sunsulei opened this issue May 19, 2016 · 1 comment
Closed

113.md 问题 #106

sunsulei opened this issue May 19, 2016 · 1 comment

Comments

@sunsulei
Copy link

齐老师好:
113.md里对于
仔细观察,变量的名字lst,不是list,不能用list作为变量名字。因为list是Python的保留字。
// 在我import keyword后 'list' in keyword.kwlist 得到的是False 。而且也并没有在keyword.kwlist里看到list。所以list并不是Python的关键字。
祝好!

@qiwsir
Copy link
Owner

qiwsir commented May 19, 2016

你好。非常感谢。

我在这里的确犯错误了。list不是保留字。

但是,因为是python默认的类型,所以,在命名变量名称的时候,也不要使用。

在 2016年5月19日 下午4:27,sunsulei notifications@github.com写道:

齐老师好:
113.md里对于
仔细观察,变量的名字lst,不是list,不能用list作为变量名字。因为list是Python的保留字。
// 在我import keyword后 'list' in keyword.kwlist 得到的是False
。而且也并没有在keyword.kwlist里看到list。所以list并不是Python的关键字。

祝好!


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#106

QiWei

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