Spelling mistakes!

Xavier Morel xavier.morel at masklinn.net
Fri Jan 6 11:12:31 EST 2006


KraftDiner wrote:
> I've spent hours trying to find a bug that was a simple spelling
> mistake.
> 
> in an init method I declare a variable  self.someLongName
> 
> later in a different method of the class I use
> self.sumLongName
> Now I really meant self.someLongName.
> In fact I don't want a variable called sumLongName.
> Frankly how are you ever to know if this type of error is occuring?
> 

PyChecker and PyLint sound like the perfect remedy to this issue (I know 
one of them is able to warn you if you *create* an attribute outside of 
__init__, maybe both are but at least one of them is)

I just run them when I save my files, they don't take long and even 
though the default configuration is *extremely* annoying (especially 
PyLint's, it generates heaps of warnings) once configured to one's need, 
they're extremely valuable for both personal and team development.



More information about the Python-list mailing list