[Python-Dev] Python 3.x and bytes
Terry Reedy
tjreedy at udel.edu
Thu May 19 22:36:42 CEST 2011
On 5/19/2011 3:49 AM, Nick Coghlan wrote:
> It's a mental model problem. People try to think of bytes as
> equivalent to 2.x str and that's just wrong, wrong, wrong. It's far
> closer to array.array('c').
Or like C char arrays
> Strings are basically *unique* in
> returning a length 1 instance of themselves for indexing operations.
I still remember having to work that out and get used to it.
--
Terry Jan Reedy
More information about the Python-Dev
mailing list