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 ethan.furman
Recipients docs@python, ethan.furman, fov, giampaolo.rodola, gvanrossum, pitrou, r.david.murray, vstinner, yselivanov
Date 2014-12-03.19:05:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1417633541.42.0.915549597985.issue22988@psf.upfronthosting.co.za>
In-reply-to
Content
Here's the excerpt from the docs:
--------------------------------
> Yield expressions are 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, allowing any pending finally clauses to execute.

This certainly makes it sound like 'yield' is okay in the 'try' portion, but not the 'finally' portion.

So 'yield' is allowed in the 'try' portion, and it's allowed in the 'finally' portion -- is it also allowed in the 'except' portion?  If so, we could simplify the first line to:

> Yield expressions are allowed in try ... except ... finally constructs.
History
Date User Action Args
2014-12-03 19:05:41ethan.furmansetrecipients: + ethan.furman, gvanrossum, pitrou, vstinner, giampaolo.rodola, r.david.murray, docs@python, yselivanov, fov
2014-12-03 19:05:41ethan.furmansetmessageid: <1417633541.42.0.915549597985.issue22988@psf.upfronthosting.co.za>
2014-12-03 19:05:41ethan.furmanlinkissue22988 messages
2014-12-03 19:05:41ethan.furmancreate