Message141726
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.
""" |
|
Date |
User |
Action |
Args |
2011-08-06 18:29:10 | nikratio | set | recipients:
+ nikratio, docs@python |
2011-08-06 18:29:10 | nikratio | set | messageid: <1312655350.4.0.122132904025.issue12704@psf.upfronthosting.co.za> |
2011-08-06 18:29:09 | nikratio | link | issue12704 messages |
2011-08-06 18:29:09 | nikratio | create | |
|