filter2
Fernando Pérez
fperez528 at yahoo.com
Thu Jun 13 15:37:25 EDT 2002
Oleg Broytmann wrote:
> I want to have new python builtin - filter2. It is exactly like filter,
> but it returns also a list of items that didn't pass the test.
>
Why not instead propose that a new keyword parameter be added to filter?
Something like filter(fn,seq,rejected=1) which would then behave as you want
it? By default, rejected would be false and the current behavior would be
maintained. This sounds like somehting you could put in a pep quickly.
f.
More information about the Python-list
mailing list