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/2016-June/144896.html below:

Minor API improvements to bytes, bytearray, and memoryview

[Python-Dev] PEP 467: Minor API improvements to bytes, bytearray, and memoryviewEthan Furman ethan at stoneleaf.us
Tue Jun 7 18:46:00 EDT 2016
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~

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