multiple sequences to filter()

Ben Wolfson rumjuggler at cryptarchy.org
Thu Aug 24 15:33:03 EDT 2000


On Thu, 24 Aug 2000 16:18:22 +0000, Peter Schneider-Kamp
<nowonder at nowonder.de> wrote:

>Ben Wolfson wrote:
>> 
>> list1, list2 = filter(lambda x,y: x==y, list1, list2)
>> 
>> Which, of course, does not work, even though it seems like a natural thing
>> to do.
>
>If you can explain the meaning of that in general terms
>(for l1, l2, ... = filter(boolfunc, l1, l2, ...)
>it shouldn't be a problem to implement.
>
>I doubt that you can come up with one, though.

I don't need to; Alex Martelli did.

-- 
Barnabas T. Rumjuggler's page of dumbth: members.home.net/rumjuggler

'Tis now the very witching time of night,
When churchyards yawn, and hell itself breathes out
Contagion to this world.  Now could I drink hot blood,
And do such bitter business as the day
Would quake to look upon.
 -- Hamlet



More information about the Python-list mailing list