This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author martin.panter
Recipients martin.panter, ncoghlan, njs, vstinner, yselivanov
Date 2016-11-14.07:38:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1479109130.03.0.503959236573.issue28629@psf.upfronthosting.co.za>
In-reply-to
Content
Perhaps I shouldn’t have mentioned “del gen”. That was meant to represent the garbage collector running and calling gen.__del__() or equivalent. Basically what I was trying to say is I think there will be two classes of generators:

1. Simple generators just implementing the plain iterator protocol, where there is nothing to clean up. In these cases a ResourceWarning is unwanted. Example: generator expressions.

2. Complex generators that have special cleanup code. Ideally the user should either exhaust the generator or call its close() method, and a ResourceWarning would be useful if neither of these happen. Example: Nick’s mygen().
History
Date User Action Args
2016-11-14 07:38:50martin.pantersetrecipients: + martin.panter, ncoghlan, vstinner, njs, yselivanov
2016-11-14 07:38:50martin.pantersetmessageid: <1479109130.03.0.503959236573.issue28629@psf.upfronthosting.co.za>
2016-11-14 07:38:50martin.panterlinkissue28629 messages
2016-11-14 07:38:49martin.pantercreate