question about what lamda does
tac-tics
tactics40 at gmail.com
Tue Jul 18 12:05:01 EDT 2006
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.
More information about the Python-list
mailing list