STINNER Victor added the comment:
> Well, it's not what format() is doing now, using str()? :)
Hum, are you sure that you tried Python 3, and not Python 2?
str(bytes) on Python 3 is well defined:
>>> print(str(b'hello'))
b'hello'
>>> print(str('h\xe9llo'.encode('utf8')))
b'h\xc3\xa9llo'
I'm not sure that you expect the b'...' format. Non-ASCII characters are
escaped as \xHH format.
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue26555>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com