Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #9888

Re: Partial Function Application -- Advantages over normal function?

From Terry Reedy <tjreedy@udel.edu>
Subject Re: Partial Function Application -- Advantages over normal function?
Date 2011-07-19 12:47 -0400
References (1 earlier) <CACNEfZaLVqY=HFvRGYbKMFxLtYBU0gLDmFfMguorJznDGOh=yA@mail.gmail.com> <j0239q$smp$1@dough.gmane.org> <mailman.1232.1311025576.1164.python-list@python.org> <1405042.q1RDiLHYyK@PointedEars.de> <4E25576E.6050300@ieee.org>
Newsgroups comp.lang.python
Message-ID <mailman.1259.1311094202.1164.python-list@python.org> (permalink)

Show all headers | View raw


On 7/19/2011 6:07 AM, Dave Angel wrote:
> On 01/-10/-28163 02:59 PM, Thomas 'PointedEars' Lahn wrote:
>> 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).
>>
>
> The two changes that I made deliberately were adding the colon and
> adding the return statement. I'm not sure how the name got changed; that
> was accidental.

Anyway, my apologies for posting quickly without testing and without 
saying so. I know better and too often leave in mistakes when I do.

-- 
Terry Jan Reedy

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: Partial Function Application -- Advantages over normal function? Dave Angel <davea@ieee.org> - 2011-07-18 17:45 -0400
  Re: Partial Function Application -- Advantages over normal function? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-07-19 00:28 +0200
    Re: Partial Function Application -- Advantages over normal function? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-07-19 00:33 +0200
      Re: Partial Function Application -- Advantages over normal function? Thomas Jollans <t@jollybox.de> - 2011-07-19 08:22 +0200
      Re: Partial Function Application -- Advantages over normal function? Ian Kelly <ian.g.kelly@gmail.com> - 2011-07-19 10:49 -0600
      Re: Partial Function Application -- Advantages over normal function? Thomas Jollans <t@jollybox.de> - 2011-07-19 18:58 +0200
      Re: Partial Function Application -- Advantages over normal function? Ian Kelly <ian.g.kelly@gmail.com> - 2011-07-19 11:15 -0600
    Re: Re: Partial Function Application -- Advantages over normal function? Dave Angel <davea@ieee.org> - 2011-07-19 06:07 -0400
    Re: Partial Function Application -- Advantages over normal function? Terry Reedy <tjreedy@udel.edu> - 2011-07-19 12:47 -0400

csiph-web