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

Ethan Furman ethan at stoneleaf.us
Sat Jul 16 20:03:13 EDT 2016


On 06/07/2016 10:42 PM, Serhiy Storchaka wrote:
> On 07.06.16 23:28, Ethan Furman wrote:

>> * Add ``bytes.iterbytes``, ``bytearray.iterbytes`` and
>>    ``memoryview.iterbytes`` alternative iterators
>
> "Byte" is an alias to "octet" (8-bit integer) in modern terminology.

Maybe so, but not, to my knowledge, in Python terminology.

> Iterating bytes and bytearray already produce bytes.

No, it produces integers:

>>> for b in b'abcid':
...   print(b)
...
97
98
99
105
100

--
~Ethan~


More information about the Python-Dev mailing list