[issue19100] Use backslashreplace in pprint

Serhiy Storchaka report at bugs.python.org
Wed Dec 11 16:07:02 CET 2013


Serhiy Storchaka added the comment:

pprint is not print.

>>> print('\u20ac')
€
>>> import pprint; pprint.pprint('\u20ac')
'€'

Default sys.displayhook doesn't fail on unencodable output.

$ LANG=C ./python
Python 3.4.0b1 (default:e961a166dc70+, Dec 11 2013, 13:57:17) 
[GCC 4.6.3] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> '\u20ac'
'\u20ac'

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19100>
_______________________________________


More information about the Python-bugs-list mailing list