➜

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.

作者 ncoghlan
收信人 alonho, benjamin.peterson, hniksic, ncoghlan, nikratio
日期 2013-11-10.13:22:23
SpamBayes Score -1.0
Marked as misclassified 是
Message-id <1384089743.55.0.325130960491.issue18861@psf.upfronthosting.co.za>
In-reply-to
内容
Unrelated to my previous comment, I'm also wondering if this may actually represent a behavioural difference between contextlib.ExitStack and the interpreter's own exception handling machinery.

ExitStack uses a recursive->iterative transformation for its stack unwinding (see issue 14963), and it needs to do a bit of fiddling to get the context right (see issue 19092).

While the contextlib test suite goes to great lengths to try to ensure the semantics of normal stack unwinding are preserved, that definitely doesn't currently cover this case, and I'm thinking the way it works may actually be more like the behaviour Nikolaus expected in the original post (i.e. setting the context as the stack is unwound rather than when the replacement exception is raised).
历史
日期 用户 动作 参数
2013-11-10 13:22:23ncoghlan修改recipients: + ncoghlan, hniksic, benjamin.peterson, nikratio, alonho
2013-11-10 13:22:23ncoghlan修改messageid: <1384089743.55.0.325130960491.issue18861@psf.upfronthosting.co.za>
2013-11-10 13:22:23ncoghlan链接issue18861 messages
2013-11-10 13:22:23ncoghlan创建