Guido van Rossum <gu...@python.org> added the comment:

[Barry]
> I know the PEP defines TargetScopeError as a subclass of SyntaxError, but it 
> doesn't really explain why a subclass is necessary.  I think seeing 
> "TargetScopeError" will be a head scratcher.  Why not just SyntaxError 
> without introducing a new exception?

Hm, that's not a bad point. We report all sorts of things found by the bytecode 
compiler as SyntaxError.

OTOH This would require a PEP change, formal review, etc. (IMO much more so 
than adding the new edge case that Nick and Damien discovered.) Maybe the best 
way of doing this would be to implement TargetScopeError now, then start the 
debate about killing it, and try to get that in before beta4?

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue37757>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to