[Python-Dev] PEP 461: Adding % formatting to bytes and bytearray -- Final, Take 2

Ethan Furman ethan at stoneleaf.us
Sun Feb 23 20:44:53 CET 2014

On 02/23/2014 03:31 AM, Antoine Pitrou wrote:
> On Sat, 22 Feb 2014 20:48:04 -0800 Ethan Furman wrote:
>> All the numeric formatting codes (such as ``%x``, ``%o``, ``%e``, ``%f``,
>> ``%g``, etc.) will be supported, and will work as they do for str, including
>> the padding, justification and other related modifiers.  The only difference
>> will be that the results from these codes will be ASCII-encoded bytes, not
>> unicode.
> You can't encode bytes, so it should be "ASCII-encoded text" ;-)

Good point, thanks.


More information about the Python-Dev mailing list