>. There's nothing mysterious about e.g. `TypeError: unsupported operand
type(s) for +: 'int' and 'str'`, unlike the case of the two concatenated
tuples. (Surely people get errors about int+str all the time, and they've
never complained -- unlike the tuple tuple case.)

Well, yes, that particular example is pretty clear. But as a rule, there
are a LOT of errors that can be pretty mysterious to newbies.

I would love to see Python become generally more informative with errors.

In this case, you’d probably get a similar error, but it’s still nice to
get it sooner, and if the hooks are in place, We could have others that are
really helpful.

-CHB


Is there value in distinguishing
> "InevitableTypeError" from "InevitableAttributeError"?
>

I don’t think so — what we need are helpful error messages. If it will be
raised at compile time, then it won’t generally be catchable in s
try-except— so the actual exception type isn’t very important.

-CHB
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to