STINNER Victor added the comment: Josh Rosenberg added the comment: > Adding a ResourceWarning even if the generator is run to completion?
I'm ok to only emit the warning is the generator is not exhausted. The warning would be emited in the destructor if the generator is not closed. In practice, the generator is *already* closed on the last file, so the warning would not be emited if the generator is exhausted. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25994> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com