This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author gvanrossum
Recipients Damien George, barry, emilyemorehouse, gvanrossum, ncoghlan, serhiy.storchaka
Date 2019-08-05.22:32:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1565044354.39.0.345165770198.issue37757@roundup.psfhosted.org>
In-reply-to
Content
[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?
History
Date User Action Args
2019-08-05 22:32:34gvanrossumsetrecipients: + gvanrossum, barry, ncoghlan, serhiy.storchaka, Damien George, emilyemorehouse
2019-08-05 22:32:34gvanrossumsetmessageid: <1565044354.39.0.345165770198.issue37757@roundup.psfhosted.org>
2019-08-05 22:32:34gvanrossumlinkissue37757 messages
2019-08-05 22:32:34gvanrossumcreate