A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2014-January/131321.html below:

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

[Python-Dev] PEP 460: allowing %d and %f and mojibake [Python-Dev] PEP 460: allowing %d and %f and mojibakeGlenn Linderman v+python at g.nevcal.com
Sun Jan 12 22:59:37 CET 2014
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20140112/f754ff82/attachment-0001.html>
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4