Python error codes and messages location

Serhiy Storchaka storchaka at gmail.com
Tue May 28 09:11:54 EDT 2013


28.05.13 11:17, Chris Angelico написав(ла):
> On Tue, May 28, 2013 at 6:10 PM, Fábio Santos <fabiosantosart at gmail.com> wrote:
>> Just to clarify, I am suggesting to have the unchanged messages in
>> tracebacks, but having some methods in the exception to get the exception
>> and message localised. Just like repr() and str() are directed at different
>> audiences (the programmer vs. The user), so is a traceback vs a message box.
>
> There's no particular reason for that to be a method on the exception,
> then. You're just asking to localize a text string, and I think that
> functionality already exists someplace :)

It will be very helpful in case of KeyError for example.





More information about the Python-list mailing list