flexibal wrote: ... > as we all know, just doing > v = 5 > declares a new variable named 'v'... but we are people, and we do make > typos... and it's very disturbing to find your program crashing after > two weeks of operation, over a NameError... because a certain branch in > your code, that was previously never taken, had finally been taken. ...
PyChecker (http://pychecker.sourceforge.net/) will help you spot this kind of thing. For example consider typo.py: def f(): x = 1 y = 1 if 0 == 1: print a else: print x+y When you run PyChecker on typo.py it will issue the following warning: typo.py:5: No global (a) found Jimmy -- http://mail.python.org/mailman/listinfo/python-list