[issue8047] Serialiser in ElementTree returns unicode strings in Py3k
Marc-Andre Lemburg
report at bugs.python.org
Mon Mar 22 10:36:32 CET 2010
Marc-Andre Lemburg <mal at egenix.com> added the comment:
Stefan Behnel wrote:
>
> Stefan Behnel <scoder at users.sourceforge.net> added the comment:
>
>> Supporting unicode for lxml.etree compatibility is fine with me, but I
>> think it might make sense to support the string "unicode" as well (as
>> a pseudo-encoding -- it's pretty clear to me that nobody will ever
>> define a real character encoding with that name :-).
>
> The reason I chose the unicode type over a 'unicode' string name at the time was that I wanted to make a clear distinction to show that this is not just selecting a different codec but that it changes the output type.
>
> I don't really care either way, though, given that this reads a lot less well in Py3. If ET supports both, lxml will follow.
There's always the possibility of adding a new official codec
called 'unicode' which converts Unicode to Unicode as no-op.
This may also be useful to have in other situations where you
want to signal a special case for Unicode input or output.
----------
nosy: +lemburg
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8047>
_______________________________________
More information about the Python-bugs-list
mailing list