[Python-ideas] bytes indexing behavior

Ethan Furman ethan at stoneleaf.us
Tue Jun 7 16:31:19 EDT 2016


On 06/07/2016 12:57 PM, Nick Coghlan wrote:
> On 7 June 2016 at 08:59, Ethan Furman <ethan at stoneleaf.us> wrote:
>> On 06/07/2016 04:27 AM, Antoine Pitrou wrote:
>>
>>> While I prefer Python 2's indexing behaviour, IMHO that ship has sailed.
>>> Python 3.5 is probably seeing massive adoption now, and by introducing
>>> another behaviour switch we only confuse users and make their lives
>>> miserable.
>>
>>
>> I agree on both counts.  Wasn't there a proposal/issue about adding some
>> convenience methods to bytes to help ease this pain?  My quick search did
>> not find it.
>
> It was in PEP 467:
> https://www.python.org/dev/peps/pep-0467/#addition-of-optimised-iterator-methods-that-produce-bytes-objects
>
> If someone wanted to take that PEP and drive it through to resolution,
> I'd be happy to hand it over (my recollection is that the sticking
> point in the previous discussion was the proposed constructor changes,
> so dropping those may make it easier to get the additional method
> accepted).

Ah, thanks.

Split new thread to resolve that PEP.

--
~Ethan~



More information about the Python-ideas mailing list