Logical lines of code counter

Sylvain Thenault sylvain.thenault at nospam.logilab.fr
Tue Aug 24 12:21:42 CEST 2004

On Tue, 24 Aug 2004 20:03:20 +1000, Tim Leslie wrote:

> Hi Sylvain,

Hi !

> Since you're alive on this list, I thought I'd throw you a couple of
> questions:
> 1) Where should I best be asking pylint questions? The mailing list looks
> a bit quite so I wasn't sure if I would get a reply.

the mailing list is the right place to ask pylint related questions. There
isn't a lot of traffic there, but you're almost sure to get an answer by
asking to this list (more than here, since I've not always the time to
read c.l.py).

> 2) Is there someway to specify a set of variables
which won't throw
> errors for being unused, eg _ when used as a dummy in a for/list comp.

yes, see "good-names" option / configuration variable. But this will allow
the name anywhere in your program.

> 3) Why does this trigger?
> W0622 	datacore.ns5 	Ns5._parseHeaders 	156 	Redefining built-in '_'
> The offending line is:
>         electrodes = [{} for _ in range(self.num_channels)]

because I guess that at some point "_" is added to builtins. This is
usually the case with internationalizable programs using gettext. It seems
that pylint itself is importing a module which add this name to the
builtins, it shouldn't. I'll investigate into this...

Sylvain Thénault                               LOGILAB, Paris (France).

http://www.logilab.com   http://www.logilab.fr  http://www.logilab.org

More information about the Python-list mailing list