Is the function filter deprecated?

Paul Rubin no.email at nospam.invalid
Thu Apr 7 07:23:30 CEST 2011


Steven D'Aprano <steve+comp.lang.python at pearwood.info> writes:
> filter(func, *seqs) -> [x for x in itertools.chain(*seqs) if func(x)]
> although I suppose functional programming purists might object :)

Maybe you really want

   filter(func, chain.from_iterable(seqs))
   



More information about the Python-list mailing list