[Python-3000] characters data type

Josiah Carlson jcarlson at uci.edu
Tue May 2 18:26:25 CEST 2006


"Guido van Rossum" <guido at python.org> wrote:
> Josiah claims that bytes is similar to a list and array('B'). Since
> the array type already supports many list methods (more than bytes
> ATM!) I'm not sure what he's after. It's more likely that bytes will
> evolve to be more like str, growing methods like startswith().

I was just explaining what was currently in the bytes PEP.  There are
other things I would personally like to have in the bytes object (string
methods are almost a requirement, some file-like methods would be
convenient; to replace StringIO, but not necessary), but no one seems to
have replied to my most recent post on the topic.

I also happen to think that the lack of a bytes literal beyond
bytes([1,2,3]), bytes("...", encoding="..."), or "...".encode("..."),
will make some uses a bit cumbersome, as will its mutability (see the
points I've been trying to make in regards to parsing / unmarshalling /
operationX).


 - Josiah



More information about the Python-3000 mailing list