Message349084
[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? |
|
Date |
User |
Action |
Args |
2019-08-05 22:32:34 | gvanrossum | set | recipients:
+ gvanrossum, barry, ncoghlan, serhiy.storchaka, Damien George, emilyemorehouse |
2019-08-05 22:32:34 | gvanrossum | set | messageid: <1565044354.39.0.345165770198.issue37757@roundup.psfhosted.org> |
2019-08-05 22:32:34 | gvanrossum | link | issue37757 messages |
2019-08-05 22:32:34 | gvanrossum | create | |
|