Francisco Martín Brugué added the comment:
In 2.7.3 >>>
>>> u'{0:c}'.format(127)
u'\x7f'
>>> u'{0:c}'.format(128)
Traceback (most recent call last):
File "<pyshell#6>", line 1, in <module>
u'{0:c}'.format(128)
UnicodeDecodeError: 'ascii' codec can't decode byte 0x80 in position 0: ordinal
not in range(128)
>>> u'{0:c}'.format(255)
Traceback (most recent call last):
File "<pyshell#7>", line 1, in <module>
u'{0:c}'.format(255)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xff in position 0: ordinal
not in range(128)
>>> u'{0:c}'.format(256)
u'\x00'
>>> u'{0:c}'.format(257)
u'\x01'
----------
nosy: +francismb
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue7267>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com