News for hackers. Stuff that matters.
Re:Ruby-style Blocks in Python by anewaccountname on Sunday March 08, 2009 @09:56PM (#507806)
Python already has a solution for callbacks:

    @reg_callback(button.onclick)
    def callback():
        do_stuff()
Re:Ruby-style Blocks in Python by jamongkad on Monday March 09, 2009 @06:12AM (#508206)
Whilst this is more pythonic I personally prefer Javascripts use of lambdas as more than a means of expression. More like a way of life for the language :-) And that is IMHO what makes it functionally closer to Scheme. Just looking at the way one defines lambdas in Javascript and their use throughout the language is a thing of beauty.