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/131218.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 mojibakeAntoine Pitrou solipsis at pitrou.net
Sat Jan 11 19:32:26 CET 2014
On Sat, 11 Jan 2014 18:41:49 +0100
Victor Stinner <victor.stinner at gmail.com> wrote:
> 
> If you agree, I will modify the PEP. If Antoine disagree, I will fork
> the PEP 460 ;-)

Please fork it.

> b'x=%s' % 10 is well defined, it's pure bytes.

It is well-defined? Then please explain me what the general case of
  b'%s' % x
is supposed to call:

- does it call x.__bytes__? int.__bytes__ doesn't exist
- does it call bytes(x)? bytes(10) gives
  b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
- does it call x.__str__? you've reintroduced the Python 2 behaviour of
  conflating bytes and unicode

Regards

Antoine.


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