equivalent to globals(), locals() for nonlocal variables?

geremy condra debatem1 at gmail.com
Wed Oct 21 15:06:31 EDT 2009


I decided to play around with nonlocal declarations today, and was
somewhat surprised when a call to nonlocals() resulted in 'nonlocals
is not defined'. Is there an a standard equivalent to globals() or
locals() for variables in outer nested scopes?

Geremy Condra



More information about the Python-list mailing list