question about what lamda does

Steve Holden steve at holdenweb.com
Wed Jul 19 03:16:34 EDT 2006


tac-tics wrote:
> nephish at xit.net wrote:
> 
>>Hey there,
>>i have been learning python for the past few months, but i can seem to
>>get what exactly a lamda is for. What would i use a lamda for that i
>>could not or would not use a def for ? Is there a notable difference ?
>>I only ask because i see it in code samples on the internet and in
>>books.
> 
> 
> Lambda is just as powerful as a function, but totally useless =-P
> 
> Lambda used to be handy before the introduction of list comprehensions.
> Now, though, there primary use is obfuscating your code.
> 
I do wish you could hold yourself back and stop muddying the waters. 
Lambdas and list comprehensions have little or nothing to do with each 
other. Unless you know something I don't ...

regards
  Steve
-- 
Steve Holden       +44 150 684 7255  +1 800 494 3119
Holden Web LLC/Ltd          http://www.holdenweb.com
Skype: holdenweb       http://holdenweb.blogspot.com
Recent Ramblings     http://del.icio.us/steve.holden




More information about the Python-list mailing list