Is the function filter deprecated?

Jabba Laci jabba.laci at gmail.com
Thu Apr 7 01:20:31 CEST 2011


Hi,

I tried Pylint today and it gave me a warning for the function
"filter". Is it deprecated? Is the usage of list comprehensions
encouraged? The transformation is not complicated, by the way:
replace "filter( func, seq )" with "[ x for x in seq if func(x) ]" .

Thanks,

Laszlo



More information about the Python-list mailing list