[issue20612] cElementTree has problems with StringIO object containing unicode content

Serhiy Storchaka report at bugs.python.org
Wed Feb 12 21:54:42 CET 2014


Serhiy Storchaka added the comment:

cStringIO.StringIO() can contains only str (unicode automatically coerced to str), while StringIO.StringIO() can contain str or unicode.

>>> SIO(uxml).read()
u'<simple />'
>>> CSIO(uxml).read()
'<simple />'

cElementTree.parse() works only with binary streams.

----------
nosy: +serhiy.storchaka

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


More information about the Python-bugs-list mailing list