[
top
|
up
]
Access to Function Call Frames
Syntax
sys.parent(n)
Description
sys.parent
provides access to the environments of function calls which enclose the call to it. This is useful for achieving dynamic scoping effects, and is reserved for use by true language wizards.
See Also
eval
,
function
.
Examples
ls(sys.parent(1)) # equivalent to ls() ls(sys.parent(2)) # lists variables in the enclosing call