STINNER Victor added the comment:

I like the idea since I just proposed something similar in the issue #29419, 
but it seems like your change removes the function name from error messages 
which can become much more obscure.

Maybe we should wrap all exceptions into a new TypeError which contains at 
least the function name, or even the parameter name/position. I mean chained 
exception to keep the original exception which contains more information.

The best would be to have all information in a single error message, but it is 
likely to be much more complex to implement, especially if you want to support 
arbitrary converter function, not only simple formats like  i". So I think that 
two chained exceptions is a reasonable compromise. What do you think?

If we succeed to get the function name and the parameter name or position, the 
error messages will be MUCH MORE better than currently! And Argument Clinic 
allows us to implement this feature.

----------
nosy: +haypo

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue23867>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to