homepage

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 <1327118610.71.0.185139816508.issue13814@psf.upfronthosting.co.za>
In-reply-to
Content
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
http://docs.python.org/py3k/reference/expressions.html#yield-expressions
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.
History
Date User Action Args
2012年01月21日 04:03:30terry.reedysetrecipients: + terry.reedy, ncoghlan, ezio.melotti, yak
2012年01月21日 04:03:30terry.reedysetmessageid: <1327118610.71.0.185139816508.issue13814@psf.upfronthosting.co.za>
2012年01月21日 04:03:30terry.reedylinkissue13814 messages
2012年01月21日 04:03:29terry.reedycreate

AltStyle によって変換されたページ (->オリジナル) /