How to Detect Use of Unassigned(Undefined) Variable(Function)
Jon Clements
joncle at googlemail.com
Fri Nov 27 06:00:20 EST 2009
On Nov 27, 10:36 am, "++imanshu" <himanshu.g... at gmail.com> wrote:
> Is there a script/module to detect the use of unassigned
> (undefined) variables(functions) in python. e.g. can I detect the
> problem on line 3 automatically :-
>
> i = 1
> if i == 3:
> print o
> print i
>
> Thank You,
> ++imanshu
pychecker returns "test.py:3: No global (o) found" for the above, and
can be found at http://pychecker.sourceforge.net/
There's also pylint and another one whose name I can't remember...
hth
Jon.
More information about the Python-list
mailing list