On Wed, Aug 8, 2018 at 5:05 PM, Barry Scott <ba...@barrys-emacs.org> wrote:
> But so long as you do not leak the generator the file will be closed
> immediately after the loop as the ref count of the generater hits 0.

Technically that's not guaranteed (since refcounts aren't a language
feature), but if you're using this generator somewhere and want to be
able to force it to close its files, all you have to do is close the
generator.

ChrisA
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to