Blurbs ansible coffeescript django dvcs erlang es6 hg javascript json lua mercurial peewee postgresql python scope sql sqlalchemy yaml

Defaults binding code pythonscope

for i in range(10):
    def callback(i=i):
        print "clicked button", i
    UI.Button("button %s" % i, callback)

# The “i=i” part binds the parameter “i” (a local variable)
# to the current value of the outer variable “i”.

http://effbot.org/zone/default-values.htm