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

2016年6月07日 15:02:32 -0700

On Jun 07, 2016, at 09:40 PM, Brett Cannon wrote:
>On Tue, 7 Jun 2016 at 14:38 Paul Sokolovsky <[email protected]> wrote:
>> What's wrong with b[i:i+1] ?
>It always succeeds while indexing can trigger an IndexError.
Right. You want a method with the semantics of __getitem__() but that returns
the desired type.
-Barry

Attachment: pgpKzXeYAKnPj.pgp
Description: OpenPGP digital signature

_______________________________________________
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