[Python-il] Silly Python riddle
ram at rachum.com
Sat Dec 17 14:56:38 IST 2011
Of course you can put a function call inside a lambda:
>>> f = lambda: sum((1, 2, 3))
> >>> f()
No easter eggs or JIT magic are involved in this riddle.
On Sat, Dec 17, 2011 at 2:55 PM, asaf greenberg <asafgreenberg at gmail.com>wrote:
> On 17/12/2011 14:14, Ram Rachum wrote:
> f = lambda: g(*???*)
> i didn't know lambdas can be used with a function call.
> actaully - i can't even use lambda: f() at all, even without your
> unless there's a jit compiler easter egg built in, like lambda g('if this
> string then return a 3d-maze with pictures of the developers')...
> Python-il mailing list
> Python-il at hamakor.org.il
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-il