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 <julien.cris...@logilab.fr> Logilab http://www.logilab.fr/ Informatique scientifique & gestion de connaissances _______________________________________________ Python-Projects mailing list Python-Projects@lists.logilab.org http://lists.logilab.org/mailman/listinfo/python-projects