[Python-Dev] Printing and unicode (original) (raw)

Martin v. Loewis martin@v.loewis.de
13 Nov 2002 22:07:36 +0100


Guido van Rossum <guido@python.org> writes:

I'm not sure about those names, but I agree that the encoding should be forced when the StringIO instance is created. Given that using Unicode with these is currently fragile at best, maybe we should say that unless you give an encoding argument, it's a byte stream and doesn't allow Unicode at all? That would be consistent with cStringIO.

But it would break compatibility, atleast with xml.dom.minidom.Node.write, which support StringIO currently, and will collect Unicode strings in it.

Regards, Martin