Message189016
| Author |
pitrou |
| Recipients |
eric.snow, flox, gvanrossum, ncoghlan, pitrou |
| Date |
2013年05月12日.11:11:20 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1368357075.2535.1.camel@fsol> |
| In-reply-to |
<1368333110.23.0.889135313213.issue17934@psf.upfronthosting.co.za> |
| Content |
> Mostly looks good to me, but I think I'd prefer that attempts to clear
> a running frame raise RuntimeError with an appropriate message.
Hmm, why not. My intuition was to make frame.clear() a best-effort
method, but this sounds ok too.
> I also wonder how this might relate to Eric Snow's proposal to
> reference the currently executing function from the frame object (see
> issue 12857). It seems to me that the "f_func" pointer in that patch
> could serve the same purpose as the "f_executing" boolean flag in this
> patch, while providing additional information about the execution
> context.
Yes, perhaps. Then Eric's patch can incorporate that change once the
frame.clear() patch is committed.
> (We may want to add a "clear_frames" convenience method to tracebacks
> as well)
That, or in the traceback module. The reason I'm proposing this one as a
frame method is that it can't be done in pure Python. |
|