STINNER Victor added the comment: > Isn't there some discussion somewhere that if iter(x) returns x you probably > have buggy code?
I agree that the issue comes from TextIOWrapper.__iter__(), BufferedReader.__iter__() and FileIO.__iter__() returns simply return self *and* have a close method. The issue is not "yield from". ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue23700> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com