Claudiu Popa added the comment: That's not the same, try with my example. open("a") will be a TextIOWrapper. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue22078> _______________________________________