[Python-Dev] unicode Exception messages in py2.7
Armin Rigo
arigo at tunes.org
Fri Nov 15 11:48:38 CET 2013
More information about the Python-Dev mailing list
Fri Nov 15 11:48:38 CET 2013
- Previous message: [Python-Dev] unicode Exception messages in py2.7
- Next message: [Python-Dev] unicode Exception messages in py2.7
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi,
FWIW, the pure Python traceback.py module has a slightly different
(and saner) behavior:
>>> e = Exception(u"xx\u1234yy")
>>> traceback.print_exception(Exception, e, None)
Exception: xx\u1234yy
I'd suggest that the behavior of the two should be unified anyway.
The traceback module uses value.encode("ascii", "backslashreplace")
for any unicode object.
A bientôt,
Armin.
- Previous message: [Python-Dev] unicode Exception messages in py2.7
- Next message: [Python-Dev] unicode Exception messages in py2.7
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list