Message232087
| Author |
fov |
| Recipients |
docs@python, ethan.furman, fov, giampaolo.rodola, gvanrossum, pitrou, r.david.murray, vstinner, yselivanov |
| Date |
2014年12月03日.19:37:41 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1417635462.26.0.321311362467.issue22988@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Thanks for the clarification; sorry I misread issue #14718.
I agree with Ethan's point. Though I would say "Yield expressions are allowed anywhere in try ... except ... finally constructs."
I'd also like to explicitly add a point about the exception-handling machinery getting frozen, but I'm not sure how to phrase it clearly and accurately. Here's an attempt (my adds in square brackets):
"By suspended, we mean that all local state is retained, including the current bindings of local variables, the instruction pointer, the internal evaluation stack, [active exception handlers, and paused exceptions in finally blocks]."
Another approach would be:
"By suspended, we mean that all local state is retained, including the current bindings of local variables, the instruction pointer, and the internal evaluation stack. [The state of any exception-handling code is also retained when yielding from a try ... except ... finally statement.]" |
|