[issue8047] Serialiser in ElementTree returns unicode strings in Py3k
Florent Xicluna
report at bugs.python.org
Sat Jul 31 18:55:45 CEST 2010
Florent Xicluna <florent.xicluna at gmail.com> added the comment:
Patch updated here, and on Rietveld too.
http://codereview.appspot.com/664043
Rules (as discussed):
- tree.tostring(encoding=None) => encodes to "US-ASCII"
(compatible with 2.7 and lxml.etree)
- tree.tostring(encoding="unicode") => outputs Unicode
- tree.tostring(encoding=str) => outputs Unicode
(compatible with lxml.etree)
For 2.7, no change planned.
For 3.1, do we keep the current behavior?
- tree.tostring(encoding=None) => outputs Unicode
----------
components: +XML
stage: patch review -> commit review
Added file: http://bugs.python.org/file18286/issue8047_etree_encoding_v2.diff
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8047>
_______________________________________
More information about the Python-bugs-list
mailing list