Dynamic Scoping problem
Daniel Lemos Itaborai
itaborai83 at yahoo.com.br
Mon Aug 23 11:13:02 EDT 2004
I would like to first apologize my question, I just picked up Python
for a spin 4 days ago(loving it so far). I am having some trouble with
this...
# myproblem.py
x = 'wrong'
def bluft(x) : x()
def foo():
x = 'right'
def bar():
global x
print x
bluft(bar)
# end myproblem.py
Is there a way to enforce scope resolution?
Thanks for the patience,
Daniel Lemos Itaborai
More information about the Python-list
mailing list