On 1/12/2014 11:14 AM, Ethan Furman wrote:
And a core principle of the bytes/text separation in Python 3 is that
encoding should never happen implicitly.

That could be. And yet the bytes type already has several concessions to ASCII encoding.

"%d" % 26 => an explicit request to convert binary integer to a base-10 Unicode/text representation of the integer

b"%d" % 26 => an explicit request to convert binary integer to a base-10 ASCII bytes representation of the integer

The leading "b" seems to be a very explicit request for bytes rather than characters to me, and seems much more attractive than the proposals to embed binary in Unicode by abusing Latin-1 encoding.
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to