[issue8047] Serialiser in ElementTree returns unicode strings in Py3k

R. David Murray report at bugs.python.org
Fri Mar 12 01:14:24 CET 2010


R. David Murray <rdmurray at bitdance.com> added the comment:

Well, Benjamin pointed out to me that it would be a bad thing if array.tostring produced a string.  True, the method is named wrong, but it is less broken than returning a string.  I suspect that that is the same argument Fredrik is making: that returning the XML as a byte string is less broken than returning it as a string when it in fact may contain other encoded stuff.  The email package has some of the same problems, and there we are retooling the API to deal with this.

Presumably ET needs to have a retooled API for Python3 as well.  Then the question becomes what do we do in the meantime?  For email, we are just living with the breakage until we can get something better in place, because no one has come up with any good short term solutions for email.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8047>
_______________________________________


More information about the Python-bugs-list mailing list