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 terry.reedy
Recipients ezio.melotti, ncoghlan, terry.reedy, yak
Date 2012-01-21.04:03:29
SpamBayes Score 0.0003757951
Marked as misclassified No
Message-id <>
Calling g.close() is pointless for a generator used in normal pull mode and run to completion, as in the example. The generator is already 'closed', so g.close() does not do anything useful. See

The method was added to be used with .send() so that generators used in push mode could be told to finish up when there is nothing more to send. For such rare uses, contextlib.closing should usually be sufficient, I think.

So I think this issue should be closed.
Date User Action Args
2012-01-21 04:03:30terry.reedysetrecipients: + terry.reedy, ncoghlan, ezio.melotti, yak
2012-01-21 04:03:30terry.reedysetmessageid: <>
2012-01-21 04:03:30terry.reedylinkissue13814 messages
2012-01-21 04:03:29terry.reedycreate