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 nikratio
Recipients docs@python, nikratio
Date 2011-08-06.18:29:09
SpamBayes Score 1.5903397e-07
Marked as misclassified No
Message-id <1312655350.4.0.122132904025.issue12704@psf.upfronthosting.co.za>
In-reply-to
Content
From http://www.python.org/dev/peps/pep-0342/ I believe that the last yield will raise GeneratorExit. So my suggestion is to replace the above mentioned paragraph with:

"""
As of Python version 2.5, yield is an expression rather than a statement and allowed in the try clause of a try ... finally construct. If the generator is not resumed before it is finalized (by reaching a zero reference count or by being garbage collected), the generator-iterator’s close() method will be called, and the yield expression in the generator function will raise GeneratorExit. 

If the generator function raises GeneratorExit (either directly or by not catching it), future calls to the next() method of the generator iterator will raise StopIteration. GeneratorExit exceptions raised by the generator function are catched internally and do not result in a call to sys.excepthook.
"""
History
Date User Action Args
2011-08-06 18:29:10nikratiosetrecipients: + nikratio, docs@python
2011-08-06 18:29:10nikratiosetmessageid: <1312655350.4.0.122132904025.issue12704@psf.upfronthosting.co.za>
2011-08-06 18:29:09nikratiolinkissue12704 messages
2011-08-06 18:29:09nikratiocreate