Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: shaharr <info <at> shaharr.info>
Subject: Re: Silly Python riddle
Newsgroups: gmane.comp.python.israel
Date: Saturday 17th December 2011 13:11:19 UTC (over 5 years ago)

  
    
    
  
  
    oops, i dislectically thought the g() is before the colon!
(still, i can't figure it out.)

On 17/12/2011 14:56, Ram Rachum wrote:
Of course you can put a function call inside a lambda:

>>> f = lambda: sum((1, 2, 3))
>>> f()
6

No easter eggs or JIT magic are involved in this riddle.

On Sat, Dec 17, 2011 at 2:55 PM, asaf greenberg <[email protected]> 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 restrictions.

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
[email protected]
http://hamakor.org.il/cgi-bin/mailman/listinfo/python-il" target="_blank">http://hamakor.org.il/cgi-bin/mailman/listinfo/python-il




_______________________________________________
Python-il mailing list
[email protected]
http://hamakor.org.il/cgi-bin/mailman/listinfo/python-il">http://hamakor.org.il/cgi-bin/mailman/listinfo/python-il


 
CD: 12ms