On Sun, May 10, 2015 at 10:14 AM, Peter Otten <__pete...@web.de> wrote:
> When there was an actual speed-up I also had a look at
> PyEval_GetGlobals/Locals() which in turn call
>
> PyEval_GetFrame()
>
> and
>
> PyEvalPyFrame_FastToLocalsWithError()
>
> whatever these do. (The first function reminded me of sys._getframe() hence
> the mention of stack inspection)

Based on the names, I surmise that the first one gets the top stack
frame object, and that the second one extracts the "fast" local
variables from the frame object and builds a dict of them for use by
eval.
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to