On 7 June 2016 at 08:59, Ethan Furman <ethan@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-met... 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). Cheers, Nick. -- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia