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

2014年1月11日 10:35:03 -0800

On 2014年1月11日 18:41:49 +0100
Victor Stinner <[email protected]> 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.
_______________________________________________
Python-Dev mailing list
[email protected]
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