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

Greg Ewing greg.ewing at canterbury.ac.nz
Wed Jan 15 05:18:37 CET 2014


Steven D'Aprano wrote:

> I don't think mixing bytes and strings makes good semantic sense.

It's not about mixing bytes and text -- it's about
writing polymorphic code that will work on either
bytes *or* text. Not both at the same time.

If we had quantum computers, this would be easy
to solve: asciistr would be of type
str/sqrt(2) + bytes/sqrt(2), and everything would
work out fine. :-)

-- 
Greg


More information about the Python-Dev mailing list