list-comprehension and map question (simple)

Charles Hartman charles.hartman at conncoll.edu
Sun Mar 27 12:14:02 EST 2005


On Mar 27, 2005, at 11:50 AM, Nicolas Évrard wrote:

>>
>> I hope the question is clear enough. I have a feeling I'm ignoring a  
>> simple technique . . .
>
> lambda !
>
> map(lambda x: timestwo(getlength(x)), ...)

Ah, lambda! I've heard so much bad-mouthing of lambda that I forgot to 
learn it . . . This is quite cool, and it looks as though it would work 
with more complicated function calls than the ones in my toy example. 
Thanks.

Charles Hartman




More information about the Python-list mailing list