Partial Function Application -- Advantages over normal function?
Thomas 'PointedEars' Lahn
PointedEars at web.de
Mon Jul 18 18:28:15 EDT 2011
Dave Angel wrote:
> On 01/-10/-28163 02:59 PM, Terry Reedy wrote:
>> def makeadder(y)
>> def _add(x): return x+y
>> add2 = makeadder(2)
>
> A couple of typos in that code:
>
>
> def makeaddr(y):
> def _add(x): return x+y
> return _add
I agree about the `return' statement, but not about the factory name; this
has nothing to do with addresses (addr).
--
PointedEars
Bitte keine Kopien per E-Mail. / Please do not Cc: me.
More information about the Python-list
mailing list