[Tutor] Accessing callers context from callee method

spir denis.spir at free.fr
Tue Feb 24 20:15:50 CET 2009


Le Tue, 24 Feb 2009 10:53:29 -0800,
mobiledreamers at gmail.com s'exprima ainsi:

> when i call a method foo from another method func. can i access func context
> variables or locals() from foo
> so
> def func():
>   i=10
>   foo()
> 
> in foo, can i access func's local variables on in this case i
> Thanks a lot

def func():
  i=10
  foo(i)

------
la vita e estrany


More information about the Tutor mailing list