[issue2630] repr() should not escape non-ASCII characters

Guido van Rossum report at bugs.python.org
Tue Apr 15 05:10:14 CEST 2008


Guido van Rossum <guido at python.org> added the comment:

Atsuo: I missed Michael Urman's comment.  Can you copy it here, or
(better :-) write a patch that uses it?

Amaury: I think it would be okay to use backslashreplace as the default
error handler for sys.stderr.  Probably not for sys.stdout or other
files, since I'm sure many users prefer the errors when their data
cannot be printed rather than silently writing \u escapes that might
cause other code reading their output to choke.  For sys.stderr though I
think not having exceptions raised when attempting to print errors is
very valuable.

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2630>
__________________________________


More information about the Python-bugs-list mailing list