On 28/06/13 19:51, Jim Mooney wrote:
Now you'll make me learn what lambda is.
Ah, it's like an anonymous function in jQuery,
That's the idea but Python lambdas are a bit crippled
so its really an anonymous expression... :-(
But if you know JQuery then lambdas should be
easy to pick up. And they are really useful in GUI
and Functional programming contexts.
In summary:
foo = lambda <paramList>: return <expression>
is equivalent to
def foo(paramList):
return expression
HTH
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
_______________________________________________
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor