[Python-Dev] Re: adding a bytes sequence type to Python (original) (raw)

Paul Prescod paul at prescod.net
Wed Aug 18 04:15:54 CEST 2004


M.-A. Lemburg wrote:

...

We already have a number of read-write types for storing binary data, e.g. arrays, cStringIO and buffers. Inventing yet another way to spell binary data won't make life easier.

The point is canonicalize one and start to make APIs that expect it. Otherwise we will never make the leap from the bad habit of using strings as byte arrays. Can you pass arrays to the write() function? Can you decode buffers to strings? A byte array type would have a certain mix of functions and API compatibility that is missing from the plethora of similar thingees.

Paul Prescod



More information about the Python-Dev mailing list