[Python-Dev] ElementTree.tostring() returning str by default in Py3.2 (original) (raw)
Stefan Behnel stefan_ml at behnel.de
Tue Mar 2 10:06:06 CET 2010
- Previous message: [Python-Dev] PEP 3188: Implementation Questions
- Next message: [Python-Dev] ElementTree.tostring() returning str by default in Py3.2
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi,
I just noticed that the xml.etree.ElementTree.tostring() function in Py3.2 returns a str object by default, unless an encoding is specified. This is a backwards incompatible change compared to ET 1.2. For one, it breaks tons of tests in lxml's compatibility test suite. Previously, the default encoding was 'ASCII', and tostring() was guaranteed to always return a byte string.
According to svn blame, this was changed by GvR in rev. 56841.
Is there any reasoning behind this?
Stefan
- Previous message: [Python-Dev] PEP 3188: Implementation Questions
- Next message: [Python-Dev] ElementTree.tostring() returning str by default in Py3.2
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]