Here it is as an attachment.

On Thu, Jan 17, 2013 at 8:45 PM, Julien Cristau
<[email protected]>wrote:

> On Mon, Jan 14, 2013 at 11:18:18 +1100, Martin Pool wrote:
>
> > Hello pylint hackers,
> >
> > Google's Python style guide says that rather than
> >
> >   map(lambda a: a+2, numbers)   # bad
> >
> > you should say
> >
> >   [a+2 for a in numbers]
> >
> > and similarly for filter.
> >
> > I think this is pretty good style for Python generally, and Guido said
> this
> > too in <http://www.artima.com/weblogs/viewpost.jsp?thread=98196> in
> 2005.
> >
> > So this patch will warn if you have an inline lambda as the first
> argument
> > to map or filter.  It will not complain if you construct a lambda
> > separately and pass it through a variable, or if you pass some other
> > function to map or filter.
> >
> Looks reasonable to me.  The patch is line-wrapped though, maybe you can
> resend as an attachment?  (I don't have any better naming suggestion
> right now)
>
> Julien
> --
> Julien Cristau          <[email protected]>
> Logilab                 http://www.logilab.fr/
> Informatique scientifique & gestion de connaissances
>



-- 
Martin

Attachment: 2013-01-11-pylint-map-lambda.diff
Description: Binary data

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

Reply via email to