"Guido van Rossum" <[EMAIL PROTECTED]> wrote:
> Better ways to do this might be [c]StringIO (in theory -- I don't know
> if it's fast enough in practice, but this should be easy to test) or
> the standard "".join(<list of strings>) approach (which underlies
> StringIO's implementation as well -- though not cStringIO's IIRC).

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).

 - Josiah

_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to