Serhiy Storchaka added the comment: I rather think that it's a bug in _io.StringIO.getvalue(). ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue20435> _______________________________________