lint for Python?

Lawrence D'Oliveiro ldo at geek-central.gen.new_zealand
Fri Oct 3 23:15:04 EDT 2008


In message <gc63c7$gi2$1 at aioe.org>, Pat wrote:

> In module one, I have a function:
> 
> def foo( host, userid, password ):
>      pass
> 
> In module two, I call that function:
> 
> foo( userid, password)
> 
> lint doesn't find that error and it won't be caught until it's called
> while the program is running.  I don't want that error found at 3AM.
> 
> I've never used a language that didn't catch that type of error.

Because in Python, it's not necessarily an error. Every name you define in
Python is just a variable, and can have its value changed at any time: the
compiler can't tell that foo won't have a different value put into it
between the definition of the function and the actual call.



More information about the Python-list mailing list