-
Notifications
You must be signed in to change notification settings - Fork 119
Open
Labels
good first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed
Description
问题灵感:
@古明地觉https://mp.weixin.qq.com/s/fPmo14sBZXJgEUodTL7y1g
Python 在变量查找的时候遵循 LEGB 规则,也就是按照本地作用域、闭包、全局作用域、内置作用域的顺序。然而,列表解析式有自己的本地作用域,并不使用函数或者类的作用域!!
1.为什么py3会这样?
2.为什么py3和py2的行为不一样?
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed