Hi,
I have a line like this:
filter(lambda x: x == 1, [1, 1, 2])
Pylint is showing a warning:
W: 3: Used builtin function 'filter'
Why is that? is a list comprehension the recommended method?
Of course I can rewrite this like this:
[x for x in [1, 1, 2] if x == 1]
And I get no warnings, but I was wondering if there's a PEP for this?