[Python-Dev] pychecker on 2.2 current

Neal Norwitz neal@metaslash.com
Wed, 05 Dec 2001 21:50:24 -0500


Guido van Rossum wrote:
> 
> > > But isn't that because the new code is all at the module-global level,
> > > which pychecker doesn't "see"?  Or have you fixed that yet?
> >
> > pychecker does "see" all code at the module level,
> 
> I stand corrected.  I think this was the case for an older version?

Yes, you are correct it was the case a while ago.
BTW, same is true for code at the class scope, 
ie, it used to be missed, but it is checked now.

> > but it isn't perfect.  If there is code like:
> >
> >       import sys
> >       if sys.platform == 'win32':
> >               def x(a, b): pass
> >       else:
> >               def x(a): pass
> >
> > The following incorrect warning is produced:
> >       t2.py:5: Redefining attribute (x) original line (3)
> >
> > Because both versions of the function x() are seen.
> 
> Hm, I would call that warning correct. :-)

:-)