Donn Ingle a écrit : (snip) > [in one.py] > kills=0 > def boo(): > print kills > > It will abort with: > print kills > UnboundLocalError: local variable 'kills' referenced before assignment
As far as I can tell, you have a bit more code in boo, and somewhere in that code (after the print statement), you rebind the name 'kills'. In the absence of a global declaration, this makes this name a local variable. FWIW, this is a FAQ. -- http://mail.python.org/mailman/listinfo/python-list