[Python-3000] characters data type

Guido van Rossum guido at python.org
Wed May 3 07:27:24 CEST 2006


On 5/2/06, Josiah Carlson <jcarlson at uci.edu> wrote:
> This is one of the reasons why I'm pushing for some string methods on
> the bytes object.  Even if bytes resize themselves quickly during
> 'extension', a single allocation with a single pass copy will be far
> faster.  It probably won't be quite as convenient as "".join() (if there
> isn't a literal), but keeping the .join method seems to be a winner (if
> only because it saves people from having to learn a different method for
> unicode and bytes).

I wonder if that's really true. After all you still pay the overhead
for the list. In fact, here's a challenge for you: implement += on
bytes to be as fast as the list append + later join; or prove that it
can't be done.

Regarding your writing vs. my reading speed: (a) I hope you know the
quote about "I apologize for this long letter but I don't have the
time to make it shorter"; (b) I was referring to the discussion
between you and MvL; that was definitely going too fast for anyone
else to read it all. It really isn't necessary to do a point-by-point
reply of everything the other person said. (And I need to heed this
advice myself too!)

--
--Guido van Rossum (home page: http://www.python.org/~guido/)


More information about the Python-3000 mailing list