[issue34939] Possibly spurious SyntaxError: annotated name can't be global

Ivan Levkivskyi report at bugs.python.org
Tue Oct 9 05:38:05 EDT 2018


Ivan Levkivskyi <levkivskyi at gmail.com> added the comment:

Hm, I think this should be allowed. The formulation in the docs is not very clear, but the wording in the PEP clarifies the intention. Indeed, only annotations at the same scope with global declarations should be prohibited.

So I think this is a bug.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34939>
_______________________________________


More information about the Python-bugs-list mailing list