[Python-Dev] PEP 461: Adding % formatting to bytes and bytearray -- Final, Take 3
Victor Stinner
victor.stinner at gmail.com
Wed Mar 26 22:41:12 CET 2014
2014-03-26 15:35 GMT+01:00 Ethan Furman <ethan at stoneleaf.us>:
> -------------------------------------------------------------------------------
> Examples::
>
> >>> b'%a' % 3.14
> b'3.14'
>
> >>> b'%a' % b'abc'
> b'abc'
This one is wrong:
>>> repr(b'abc').encode('ascii', 'backslashreplace')
b"b'abc'"
Victor
More information about the Python-Dev
mailing list