Serhiy Storchaka added the comment: > Ah yes, correct: when a generator using "yield from obj" is destroyed while > yield from is not done, obj.close() is called if the method exists.
But why obj.close() is called? The reference to fileobj is live, it shouldn't be closed. > This solution looks more complex than tempfile_iter_fix.patch. Why you prefer more complex solution to simple solution? ---------- _______________________________________ 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