On 23 February 2013 03:04, Sylvain Thénault <[email protected]>wrote:
> Hi Martin, > > sorry for the late follow-up. > > I've created a ticket for your feature: > https://www.logilab.org/ticket/120657 > and pushed the patch into the review process. > > Here is my quick review: > > * we'll want a ChangeLog entry :) > > * 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. 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. -- Martin
_______________________________________________ Python-Projects mailing list [email protected] http://lists.logilab.org/mailman/listinfo/python-projects
