Message384564
"pprint" can transform unicode like "print". However, pprint fails to transform non-breaking space('\240') . See the following example:
Python 3.10.0a2 (default, Nov 24 2020, 14:18:46)
[GCC 7.5.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
Example 1(Results as expected):
---------------------------------------------------------------------
>>> import pprint
>>> print(u'\041 hello')
! hello
>>> pprint.pprint(u'\041 hello')
'! hello'
Example 2(Results not as expected):
---------------------------------------------------------------------
>>> print(u'\240 hello')
hello
>>> pprint.pprint(u'\240 hello')
'\xa0 hello'
Expected output: the output of pprint.pprint(u'\240 hello') should be consistent with output of print(u'\240 hello') |
|
Date |
User |
Action |
Args |
2021-01-07 06:47:34 | xxm | set | recipients:
+ xxm, vstinner, ezio.melotti |
2021-01-07 06:47:34 | xxm | set | messageid: <1610002054.28.0.212080312966.issue42852@roundup.psfhosted.org> |
2021-01-07 06:47:34 | xxm | link | issue42852 messages |
2021-01-07 06:47:34 | xxm | create | |
|