Re: [Python-Dev] PEP 467: Minor API improvements to bytes, bytearray, and memoryview

2016年6月07日 15:47:41 -0700

On 06/07/2016 02:33 PM, Paul Sokolovsky wrote:
This PEP proposes to deprecate that behaviour in Python 3.6, and
remove it entirely in Python 3.7.
Why the desire to break applications of thousands and thousands of
people? Besides, bytes(3) behavior is very logical. Everyone who knows
what malloc(3) does also knows what bytes(3) does. Who doesn't, can
learn, and eventually be grateful that learning Python actually helped
them to learn other language as well.
Two reasons:
1) bytes are immutable, so creating a 3-byte 0x00 string seems
 ridiculous;
2) Python is not C, and the vagaries of malloc are not relevant to
 Python.
However, there is little point in breaking working code, so a deprecation without removal is fine by me.
--
~Ethan~
_______________________________________________
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