[Python-Dev] Direction of PyChecker

Guido van Rossum guido@python.org
Fri, 10 Aug 2001 11:15:14 -0400


> > I would like PyChecker to use a fundamentally different way of
> > scanning modules.  I believe that it currently imports the module and
> > then scans the module's __dict__ for classes and functions, and
> > analyses their bytecode.  That's fragile, dangerous (if you don't know
> > what a module does you may not want to import it), and sometimes
> > causes spurious errors, like when I have this at the global level:
> 
> Yes, this is one of the worst problems I know of.  I plan on changing this.

If you don't want to give up scanning the bytecode (if that's what you
do), you could use compile() on the source code to get the bytecode
for the entire module.

--Guido van Rossum (home page: http://www.python.org/~guido/)