I didn't see this mentioned in the thread yet: the double-lambda is unnecessary (and a hack). What you should do when you need early binding is... early binding. ;)
Namely: f = [lambda n=n: n for n in range(10)] print f[0]() print f[1]() Note the "n=n", this prints 0 and 1 instead of 9/9. -- http://mail.python.org/mailman/listinfo/python-list