On 25 février 15:04, Martin Pool wrote:
> On 23 February 2013 03:04, Sylvain Thénault 
> <sylvain.thena...@logilab.fr>wrote:
> > * I would like to be clear about the relation between this new message and
> > the
> >   old "bad-builtin" occuring on map/filter. I bet your config is allowing
> > those by
> >   default? Though PyLint warn by default on map/filter usage. We may want
> > for instance
> >   to avoid "bad-builtin" when the usage is trapped by "deprecated-lambda".
> > Or maybe
> >   people on the list think that this new feature would allow to remove
> > map.filter from
> >   default bad builtins?
> 
> Ah, ok, yes, I suppose we do suppress that.  The Google style guide is that
> this is ok:
> 
>     map(foo, [1, 2, 3])
> 
> but this is not:
> 
>     map(lambda x: -x, [1, 2, 3])
> 
> A bit arbitrary maybe, but I agree the second is better written as a
> comprehension whereas the first is usually pretty clear, in my opinion.
> 
> This is definitely in the territory of aesthetics and house style rather
> than probable errors.

Indeed. The question become: now that we've this rather specific warning,
shall we still include map/filter in 'bad-functions'? Opinion there?

> What does pylint generally do when there's a single statement that
> generates multiple warnings?  I think I've seen it just give both, and
> perhaps that is simpler and more predictable behaviour than having them
> interact.

Yep, it will generate as many warnings as issued, no automatic treatment.
And you're right that at least in that case we should probably don't care
about it. Moreover, depending on the above question, this may become a
non-problem.

-- 
Sylvain Thénault, LOGILAB, Paris (01.45.32.03.12) - Toulouse (05.62.17.16.42)
Formations Python, Debian, Méth. Agiles: http://www.logilab.fr/formations
Développement logiciel sur mesure:       http://www.logilab.fr/services
CubicWeb, the semantic web framework:    http://www.cubicweb.org
_______________________________________________
Python-Projects mailing list
Python-Projects@lists.logilab.org
http://lists.logilab.org/mailman/listinfo/python-projects

Reply via email to