chris> On Mon, Jul 19, 2010 at 12:18:06PM +1200, Derek Harland wrote:
    >> dummy-variables-rgx=_|dummy|i|j|k

    chris> Beautiful.  Thanks all.  I like this solution the best.

Only if you *never* use those as variables.  From the features documentation:

    dummy-variables-rgx:
        A regular expression matching names used for dummy variables
        (i.e. not used).  Default: _|dummy

A couple other things come to mind.  That's a regular expression, so does
pylint automatically attach a trailing '$' anchor?  If not, any variables
prefixed with that regular expression would be treated as a dummy variable,
e.g., "icicle" as well as "i".

    dummy-variables-rqx=_|([ijk]|dummy)$

In English: and variable with a leading underscore or the variable names,
"i", "j", "k" and "dummy".

Also, note the notion of dummy variables is probably not restricted in scope
to just formal parameters and loop variables.  If you ever use i, j, k as a
valid variable the above will, I think, keep pylint from checking for use
everywhere in your code.

-- 
Skip Montanaro - [email protected] - http://www.smontanaro.net/
_______________________________________________
Python-Projects mailing list
[email protected]
http://lists.logilab.org/mailman/listinfo/python-projects

Reply via email to