On 08.08.2019 20:54, Barry Warsaw wrote:
On Aug 8, 2019, at 10:41, Tim Peters <tim.peters@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.
It looks like you are forgetting that an exception presented to the user is accompanied with an explanation text. Something like "Cannot assign `i` because this name is already used as a comprehension's loop variable" would clarify what exactly they did wrong.
I-am-the-Walrus-lyrics-won’t-help-you-at-all-ly y’rs, -Barry
_______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-leave@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/SSPDFUPP...
-- Regards, Ivan