[Python-3000] characters data type

Josiah Carlson jcarlson at uci.edu
Wed May 3 07:03:59 CEST 2006


"Guido van Rossum" <guido at python.org> wrote:
> On 5/2/06, Josiah Carlson <jcarlson at uci.edu> wrote:
> > 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.
> 
> Perhaps because you generate posts faster than most people can read. I
> don't have time to reply to every single item on your list; I'd just
> recommend that you calm down. (But I want to add that unifying bytes
> and StringOI seems a bad idea -- StringIO contains state beyond the
> contents of the array and it makes more sense to use a separate object
> for that.)

I assure you, it takes me far longer to write these messages than it
takes to read them.  But it would be nice if *anyone* were to reply with
something, *anything*, even "...I have low hopes for something useful
coming out of this." (my favorite Guido quote, btw) would give me some
perspective to either acknowledge my insanity, or the other thing.


> > 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).
> 
> I think it's way too soon to know.

It certainly is too soon to *know*, but based on my own code, I *think*
that not having bytes literals, as well as bytes mutability, will make
more operations cumbersome than not.

One nice thing about bytes actually holding small integers, from the "we
don't want text to be inside of bytes" desire, is that people will have
to jump through hoops to actually print out such text (something like
print "".join(map(chr, bytes)) ).

 - Josiah



More information about the Python-3000 mailing list