[Zope-Coders] Re: [Zope-Checkins] CVS: Zope27/lib/python/TAL - TALInterpreter.py:1.68.26.2

Guido van Rossum guido@python.org
Mon, 09 Sep 2002 11:48:23 -0400


> This doesn't necessarily mean StringIO has to be changed, but rather
> that those who call it have to ensure that they always pass the same
> kind of strings to it.

If you have that much control, why not use a simpe list and append()
your Unicode strings to it?  Then you can use "".join(L) to construct
the final value.

StringIO is there (presumably) because you *haven't* got control, and
you're depending on other code that calls write() on a file-like
object.

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