[Python-Dev] Direction of PyChecker

Guido van Rossum guido@python.org
Thu, 09 Aug 2001 16:52:26 -0400

> I'd like to solicit feedback on what everyone thinks about PyChecker.

I love it when it works!

> Specifically, where should it go?  What should it include or not include?
> What should the default warnings be?

You'll never satisfy everyone.  Personally, I write too much code
without docstrings, so I find the complaints about missing docstrings
annoying.  I guess my preference would be to have the default mode ony
complain about things that have a high probability of being *coding*
errors -- undefined names and the like.  I forget if you're checking
string formatting conformance yet -- that would also be useful.

> I've seen some threads on c.l.p that checker might address.

Unfortunately the typical newbie doesn't have access to pychecker

> Do you think that there should be something added to the python 
> FAQ/doc about checker?  I'd be willing to write something.

Sure!  You can add a FAQ entry yourself -- the password is "Spam".

> I'm close to exhausting my list of warnings/checks, let me know
> if there are additional warnings/checks you can think of.

Python version compatibilities would be an interesting area to

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:

    import foo

and no other references to the module foo anywhere in the code...  You
get an error about an unused foo module.

> Thanks for your input,
> Neal
> PS I sent a patch to python-dev against 2.2a1, but it's 45k.  So
> it's awating moderator approval.  Sorry if this isn't the right
> venue for patches.

I've approved it, but in general, we'd all prefer it if you submitted
patches to the SourceForge patch manager -- that's what it's there
for.  If you want to discuss it here, post a URL. :-)

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