[Tutor] Doubts about Pylint
Alan Gauld
alan.gauld at btinternet.com
Thu Apr 10 00:15:47 CEST 2008
"Dick Moores" <rdm at rcblue.com> wrote
> Since when is 'az' a bad variable name? And 'AZ' is OK?
When it is a constant.
pyLint sees that you are assigning a numeroc literal and
so thinks that this may be a definition of a constant value.
If you disd someting like
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.
All lint tools are by tradition very exacting, even the C version
which pyLint is modelled on is notorious for throwing irrelevant
errors - like not checking the return value of a printf() function
(printf returns the number of characters printed but virtually
nobody ever checks that!)
As another poster said treat it in the spirit it is intended,
a tool to highlight *possible* causes for concern not definite
causes.
--
Alan Gauld
Author of the Learn to Program web site
http://www.freenetpages.co.uk/hp/alan.gauld
More information about the Tutor
mailing list