This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients larry, serhiy.storchaka, vstinner
Date 2017-02-02.13:50:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
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.
Date User Action Args
2017-02-02 13:50:39vstinnersetrecipients: + vstinner, larry, serhiy.storchaka
2017-02-02 13:50:39vstinnersetmessageid: <>
2017-02-02 13:50:39vstinnerlinkissue23867 messages
2017-02-02 13:50:39vstinnercreate