[EMAIL PROTECTED] wrote: [...] > def f1() : > x=88 > f2() > def f2() : > print 'x=',x > f1() > > that returns an error saying that "NameError: global name 'x' is not > defined". I expected f2 to "see" the value of x defined in f1 since it > is nested at runtime.
Ah, no, Python uses "static scoping". Google the term for more. -- --Bryan -- http://mail.python.org/mailman/listinfo/python-list