phd at phd.pp.ru
Thu Jun 13 15:33:13 CEST 2002
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.
Of course I can do it with just "for" loop:
l1 = 
l2 = 
for item in alist:
but this way I am missing filter's loop written in C.
Running filter two times (with test and inverted test) is not an option,
as test could be a costly function.
Oleg Broytmann http://phd.pp.ru/ phd at phd.pp.ru
Programmers don't die, they just GOSUB without RETURN.
More information about the Python-list