[Tutor] multiple function returns

Alan Gauld alan.gauld at btinternet.com
Fri Jun 28 22:31:25 CEST 2013


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/



More information about the Tutor mailing list