[issue37757] TargetScopeError not raised for comprehension scope conflict

Guido van Rossum report at bugs.python.org
Mon Aug 5 21:53:07 EDT 2019


Guido van Rossum <guido at python.org> added the comment:

But we don't do that with any of the other (many) errors detected by later passes of the compiler. Those report dozens of SyntaxErrors, with good descriptive messages. Users can search the web for those messages too.

Also, I doubt that many people will ever get a TargetScopeError. The examples are all esoteric -- yes, the compiler needs to reject them, but no, they are not things one is likely to try intentionally. (The exception may be the forbidden form you're adding, [... for ... in (i := ...)].)

----------

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


More information about the Python-bugs-list mailing list