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
for
ClassDef
Module
Right now we can have two problems:
class Some(object): for x in [1, 2]: print(x) print(Some.x) # oups, will show you `2`
and with modules:
# some.py for x in [1, 2]: print(x) # __main__ import some print(some.x) # 2
This is not users want in 99.9% of cases. There are other - functional - solutions which don't leave extra vars in the scope.
Moreover, for is already forbidden in class bodies.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Right now we can have two problems:
and with modules:
This is not users want in 99.9% of cases. There are other - functional - solutions which don't leave extra vars in the scope.
Moreover,
for
is already forbidden in class bodies.The text was updated successfully, but these errors were encountered: