[issue37757] TargetScopeError not raised for comprehension scope conflict

Barry A. Warsaw report at bugs.python.org
Tue Aug 6 18:58:15 EDT 2019


Barry A. Warsaw <barry at python.org> added the comment:

> OTOH This would require a PEP change, formal review, etc.

It would be trivial though.  There are only two references to TargetScopeError in the PEP.  One talks about adding the exception and the other just mentions it almost in passing as a subclass of SyntaxError.

I think it would be better to just use SyntaxError.

----------

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


More information about the Python-bugs-list mailing list