On Fri, Aug 9, 2019 at 4:00 AM Barry Warsaw <ba...@python.org> wrote: > > On Aug 8, 2019, at 10:41, Tim Peters <tim.pet...@gmail.com> wrote: > > > Whereas SyntaxError would give no clue whatsoever, and nothing useful > > to search for. In contrast, a search for TargetScopeError would > > presumably find a precisely relevant explanation as the top hit > > (indeed, it already does today). > > > > I don't care because it's unlikely an error most people will make at > > all - or, for those too clever for their own good, make more than once > > ;-) > > I agree it’s probably going to be a rare occurrence. I suppose it just > bothers me that when it does happen, we’ll present an obscurely named > exception that will essentially force users to search for it. But maybe > they’ll have to anyway. OTOH, maybe we can find an even better name, like > EggManError or KooKooKaChooError. >
ConfusedWalrusError? :) I think it's good to have a subclass of SyntaxError for this. It's way easier to recognize what's going on when the exception name makes it clear that this isn't a typo. Trying to be too descriptive in the name will just make it too long, but maybe AmbiguousScopeError would be better? ChrisA _______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/OVLTKZBKO5AACKYPXNMCLYLZUR5XOWPY/