[docs] [issue10942] xml.etree.ElementTree.tostring returns type bytes, expected type str

Gunnar Eikman report at bugs.python.org
Mon Apr 23 16:42:07 CEST 2012

Gunnar Eikman <gunnar.eikman at gmail.com> added the comment:

I moved a working script from Ubuntu (Python 3.1.2) to Windows (Python 3.2.3) today.

Had to revise script. The tostring method returns a string on Linux (contradicts this issue), but bytes on Windows (as described in this issue)...

I used tostring with a single argument "tostring(theXml)"

Is there an explanation for this? I am not an advanced Python hacker...

Be careful when moving from one environment to another!

nosy: +Gunnar.Eikman

Python tracker <report at bugs.python.org>

More information about the docs mailing list