[Python-Dev] Fwd: PEP 467: Minor API improvements for bytes & bytearray (original) (raw)
Barry Warsaw barry at python.org
Mon Aug 18 01:55:02 CEST 2014
- Previous message: [Python-Dev] Fwd: PEP 467: Minor API improvements for bytes & bytearray
- Next message: [Python-Dev] Fwd: PEP 467: Minor API improvements for bytes & bytearray
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Aug 18, 2014, at 09:12 AM, Nick Coghlan wrote:
I'm talking more generally - do you really want to be explaining that "bytes" behaves like a tuple of integers, while "bytes.bytes" behaves like a tuple of bytes?
I would explain it differently though, using concrete examples.
data = bytes(...)
for i in data: # iterate over data as integers
for i in data.bytes: # iterate over data as bytes
But whatever. I just wish there was something better than iterbytes.
-Barry -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://mail.python.org/pipermail/python-dev/attachments/20140817/38aa8308/attachment.sig>
- Previous message: [Python-Dev] Fwd: PEP 467: Minor API improvements for bytes & bytearray
- Next message: [Python-Dev] Fwd: PEP 467: Minor API improvements for bytes & bytearray
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]