Message195967
In Python 3 ascii() uses the backslashreplace error handler.
>>> class T:
... def __repr__(self):
... return '\u20ac\udcff'
...
>>> print(ascii(T()))
\u20ac\udcff
I think using the backslashreplace error handler in repr() in Python 2.7 is good solution. Here is a patch. |
|
Date |
User |
Action |
Args |
2013-08-23 13:31:13 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, lemburg, arigo, vstinner, ezio.melotti, eric.araujo, r.david.murray, liori, Nam.Nguyen |
2013-08-23 13:31:13 | serhiy.storchaka | set | messageid: <1377264673.35.0.367417638823.issue5876@psf.upfronthosting.co.za> |
2013-08-23 13:31:13 | serhiy.storchaka | link | issue5876 messages |
2013-08-23 13:31:13 | serhiy.storchaka | create | |
|