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 r.david.murray
Recipients docs@python, ethan.furman, fov, giampaolo.rodola, gvanrossum, pitrou, r.david.murray, vstinner, yselivanov
Date 2014-12-03.18:49:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1417632597.7.0.681785594826.issue22988@psf.upfronthosting.co.za>
In-reply-to
Content
FIlipe, in case you hadn't noticed, the reason for the error in the other issue is that the generator was closed when it got garbage collected, and it ignored the close (executed a yield after the close).  Thus the error message there is accurate and expected, just as (as Guido said) the behavior here is consistent with the combined semantics of generators and try/finally.

Do you want to suggest an improvement to the docs?  It may be that we'll decide a change is more confusing than helpful, but we'll need someone to suggest a wording to decide that.
History
Date User Action Args
2014-12-03 18:49:57r.david.murraysetrecipients: + r.david.murray, gvanrossum, pitrou, vstinner, giampaolo.rodola, docs@python, ethan.furman, yselivanov, fov
2014-12-03 18:49:57r.david.murraysetmessageid: <1417632597.7.0.681785594826.issue22988@psf.upfronthosting.co.za>
2014-12-03 18:49:57r.david.murraylinkissue22988 messages
2014-12-03 18:49:57r.david.murraycreate