On 19/07/11 18:49, Ian Kelly wrote: > 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.
No, it's not an improvement. It's an illustration. -- http://mail.python.org/mailman/listinfo/python-list