Peter Hansen wrote: > Jason Mobarak wrote: > >> What's wrong with: >> >> def blah(): >> def _ (a, b, c): >> a = a + 2 >> print "stmt 2" >> return a+b/c >> return doSomethingWith(_) >> >> It's basically "anonymous", it just uses a name that you don't care >> about. AFAIK, it can be immediately clobbered later if need be. >> Otherwise, the function shouldn't be anonymous. > > > Or even better:
Python doesn't have anonymous functions. See http://boo.codehaus.org/Closures and the closures examples here: http://svn.boo.codehaus.org/trunk/tests/testcases/integration/ -- http://mail.python.org/mailman/listinfo/python-list