lambda fctions & local variables

Frantisek Kvapil fkva7312 at u-pl7.ms.mff.cuni.cz
Mon Feb 28 07:27:25 EST 2000


Hello,

I have some matching function: 
def match(pattern,value):
    return len(pattern)==len(value) 

and some finding function:
def find(pattern,list):
    return filter(lambda x: match(pattern,x),list)

but the problem is that the lambda function don't know
local variable pattern,

so may you be so nice to tell me how to make it works
(still using lambda functions if possible)


thanks and have nice day

Frantisek Kvapil




More information about the Python-list mailing list