Gunnar Aastrand Grimnes <gromg...@gmail.com> added the comment: I came across the bug when trying to write XML documents to StringIO objects. This does not work, since the output contains a mix of unicode and str objects, and StringIO gets confused.
A better alternative is to use io.BytesIO, since all output should be encoded, but this also throws an error since it gets some unicode objects. The attached file breaks for both cases (comment/uncomment StringIO to test) ---------- Added file: http://bugs.python.org/file21389/xmltest.py _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue11649> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com