[issue27999] Make "global after use" a SyntaxError
Ivan Levkivskyi
report at bugs.python.org
Fri Sep 9 08:13:10 EDT 2016
Ivan Levkivskyi added the comment:
I am attaching the patch.
Yury, I also added you here, just in case you have time for this.
Btw, while working on this I have found that the second restriction:
"""
Names listed in a global statement must not be ... in a for loop control target, class definition, function definition, or import statement.
"""
is not enforced at all, it does not give even a SyntaxWarning.
Is it something worth fixing?
----------
keywords: +patch
nosy: +yselivanov
Added file: http://bugs.python.org/file44501/patch-v1.diff
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27999>
_______________________________________
More information about the Python-bugs-list
mailing list