Antoine Pitrou <pit...@free.fr> added the comment: Oh and the following line shouldn't be needed:
data = b'xxx' if 'b' in mode else u'xxx' Since old-style file objects always take bytestrings (it's harmless, though, because the unicode string will be implicitly converted). ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue5677> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com