A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2010-March/098091.html below:

[Python-Dev] ElementTree.tostring() returning str by default in Py3.2

[Python-Dev] ElementTree.tostring() returning str by default in Py3.2 [Python-Dev] ElementTree.tostring() returning str by default in Py3.2Stefan Behnel stefan_ml at behnel.de
Tue Mar 2 10:47:06 CET 2010
Stefan Behnel, 02.03.2010 10:06:
> 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?

BTW, sorry for not reporting this earlier (the change is from 2007). It
seems that bug 7173 (or some other bug) prevented me from running lxml's
test suite in Py3 for quite a while now. This is the first time in ages
that I get a complete run in Py3.x (x>0).

Stefan

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4