[Python-Dev] PEP 460: allowing %d and %f and mojibake

Greg Ewing greg.ewing at canterbury.ac.nz
Sun Jan 12 23:12:35 CET 2014


Ethan Furman wrote:
> Your asciistr, which sometimes returns bytes and sometimes returns text, 
> is absolutely *not* what we want.

The kind of third-party thing that *might* fill the bill
would be a *function*:

    bytesformat(b"Content-Length: %d", length)

that implements all the %-specifiers we're asking for.

-- 
Greg


More information about the Python-Dev mailing list