PyEval_GetLocals and unreferenced variables
greg.ewing at canterbury.ac.nz
Sat Nov 29 12:34:01 CET 2014
Kasper Peeters wrote:
>I have something like
> def fun():
> def fun2():
> So the Python side actually doesn't see 'q' directly at all.
> I am willing to elaborate on this if you want
I think you will need to elaborate. There are several things
about the way local scopes and references to outer scopes are
implemented in Python that makes what you are asking for
If you explain the problem you're actually trying to solve,
we'll probably be able to suggest a better solution.
More information about the Python-list