We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
问题灵感: @古明地觉https://mp.weixin.qq.com/s/fPmo14sBZXJgEUodTL7y1g
Python 在变量查找的时候遵循 LEGB 规则,也就是按照本地作用域、闭包、全局作用域、内置作用域的顺序。然而,列表解析式有自己的本地作用域,并不使用函数或者类的作用域!!
1.为什么py3会这样? 2.为什么py3和py2的行为不一样?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
问题灵感:
@古明地觉https://mp.weixin.qq.com/s/fPmo14sBZXJgEUodTL7y1g
Python 在变量查找的时候遵循 LEGB 规则,也就是按照本地作用域、闭包、全局作用域、内置作用域的顺序。然而,列表解析式有自己的本地作用域,并不使用函数或者类的作用域!!
1.为什么py3会这样?
2.为什么py3和py2的行为不一样?
The text was updated successfully, but these errors were encountered: