Message164844
unicode formats (u'{:n}'.format) in python 2.x assume that the thousands seperator is in ascii, so this fails:
>>> import locale
>>> locale.setlocale(locale.LC_NUMERIC, 'fra') # or fr_FR on UNIX
>>> u'{:n}'.format(10000)
Traceback (most recent call last):
File "<pyshell#3>", line 1, in <module>
u'{:n}'.format(10000)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xa0 in position 2: ordinal not in range(128)
However, it works correctly in python 3, properly returning '10\xA00000' (the \xA0 is a nbsp) |
|
Date |
User |
Action |
Args |
2012-07-07 13:40:47 | Ariel.Ben-Yehuda | set | recipients:
+ Ariel.Ben-Yehuda |
2012-07-07 13:40:47 | Ariel.Ben-Yehuda | set | messageid: <1341668447.61.0.319523039673.issue15276@psf.upfronthosting.co.za> |
2012-07-07 13:40:47 | Ariel.Ben-Yehuda | link | issue15276 messages |
2012-07-07 13:40:46 | Ariel.Ben-Yehuda | create | |
|