It would be possible if foo() was declared inside of func():
def func():
i=10
def foo():
print i
foo()
On Tue, Feb 24, 2009 at 10:54 AM, <[email protected]> wrote:
> * ** Accessing callers context from callee method**
> *
>
> 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
> --
> Bidegg worlds best auction site
> http://bidegg.com
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---