On Tue, Jul 19, 2011 at 12:22 AM, Thomas Jollans <t...@jollybox.de> wrote: >> Supplemental: The above can be simplified to >> >> def makeadder(y): return lambda x: x + y >> > > In turn: > > makeadder = lambda y: lambda x: x + y
That's not an improvement. lambda is for making anonymous functions. If you're going to construct a lambda and bind it to a name, you should just use def. -- http://mail.python.org/mailman/listinfo/python-list