[Tutor] Doubts about Pylint

Alan Gauld alan.gauld at btinternet.com
Thu Apr 10 09:57:24 CEST 2008


"Dick Moores" <rdm at rcblue.com> wrote

>>A = 8
>>az = A
>>
>>It may well be happy since A is a constant and the variable
>>is being assigned the constant rather than the literal.
> 
> Thanks, Alan, but I tried your
> 
> A = 8
> az = A
> 
> and got the same complaint about az.

OK, In that case its probably the fact its global as suggested by 
Jerry and the regex approach being used is assuming all globals 
should be functions or classes or Consts...

The bottom line is that its highlighting something the author 
thought might indicate a problem not necessarily a valid error.

I once used a version of C lint that had a -v flag that printed an 
explanatory message along with each reported error, it would 
be nice if pyLint did the same - a nice wee project for anyone 
that's feeling bored and wants to contribute something to the 
Python/Opensource community maybe?!!! :-)

Alan G



More information about the Tutor mailing list