Evaluating *EVERYTHING*

Grant Edwards grante at visi.com
Fri Mar 30 10:40:41 EST 2001


In article <mailman.985935647.12028.python-list at python.org>, Steve Purcell wrote:

>> Is there a way to get python to look through a whole file and
>> say "Whoa there bucky - I've never heard of FoobarExceptoin"
>
>You can never really track down all such possible problems,
>because the names used for objects in your python code could
>(in theory more often than in practice) be defined only at
>execution time. As an extreme example, look at the following:

Like you said, that doesn't happen as much in practice (at
least not in the programs I write).

>For that reason, I see things like this: in Python, there's no
>difference between a typo and a coding logic mistake, because
>you won't find either until you run that code in a test or 'for
>real'.

In almost all of my python programs, it would be possible to
detect typos like the OP described by static analysis. It's
possible that typos in difficult paths might not be detected
until long after the program is in use but could be easily
detected with a static analysis.  Not sure if the ROI justifies
the expenditure of writing a lint program for Python.

-- 
Grant Edwards                   grante             Yow!  ... I want a COLOR
                                  at               T.V. and a VIBRATING BED!!!
                               visi.com            



More information about the Python-list mailing list