Filter is not deprecated, but it was almost removed from Python 3.x.

It's also an unnecessary extra, now that Python has List Comprehensions and
Generator Expressions.  Python does not adhere to TMTOWTDI, fortunately.

Pylint is not (and cannot be) all things to all people - at least, not right
out of the box.   Out of the box, it is one (useful) standard for what code
should look like, not the final word on what code should look like.  If you
need to disable messages about use of filter, you can easily add comments to
disable them on a case by case basis, or set up a pylint rc file to disable
them for an entire project at once.

Personally, I just don't use filter anymore.  At least, not in new code.

On Wed, Apr 6, 2011 at 8:03 PM, Jabba Laci <[email protected]> wrote:

> Hi,
>
> Pylint gives me a warning for the function "filter". As I know, this
> function is not deprecated. Is the usage of list comprehensions
> encouraged? Should I avoid "filter" (and why)?
>
> Thanks,
>
> Laszlo
> _______________________________________________
> Python-Projects mailing list
> [email protected]
> http://lists.logilab.org/mailman/listinfo/python-projects
>



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

Reply via email to