On Sun, 24 Jun, 7stud wrote: > ef outer(): > a = 10 > def inner(): > print a > > return inner > > > f = outer() > f() > > --output:-- > 10 >
>>> def outer(): ... a = 10 ... def inner(): ... a = a + 1 ... print a ... return inner ... >>> f=outer() >>> f() Traceback (most recent call last): File "<stdin>", line 1, in ? File "<stdin>", line 4, in inner UnboundLocalError: local variable 'a' referenced before assignment -- Stefan Bellon -- http://mail.python.org/mailman/listinfo/python-list