Re: Functional way to compare things inside a list

Discussion in 'Python' started by Chris Angelico, Sep 21, 2012.

  1. On Fri, Sep 21, 2012 at 6:28 PM, Chris Rebert <> wrote:
    > On Fri, Sep 21, 2012 at 1:23 AM, Chris Angelico <> wrote:
    >> On Fri, Sep 21, 2012 at 8:58 AM, <> wrote:

    > <snip>
    >> That gets the result, but probably not in the cleanest way. I'm not
    >> sure off-hand if Python has a convenient way to curry a function,

    >
    > http://docs.python.org/library/functools.html#functools.partial


    Thanks, that'd be it; didn't come up in a quick search for 'curry'
    (for obvious reason). So it would probably be possible to do it as a
    one-liner with a honking big lambda, but if code clarity is what you
    want, I'd go with the externally-defined function.

    > Cheers,
    > Chris of the Northern Hemisphere


    :)

    ChrisA
    Chris Angelico, Sep 21, 2012
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. gf gf
    Replies:
    6
    Views:
    315
    Dave Benjamin
    Mar 5, 2005
  2. Replies:
    15
    Views:
    264
    Ramchandra Apte
    Sep 23, 2012
  3. Chris Angelico
    Replies:
    0
    Views:
    197
    Chris Angelico
    Sep 21, 2012
  4. Chris Rebert
    Replies:
    0
    Views:
    166
    Chris Rebert
    Sep 21, 2012
  5. Chris Rebert
    Replies:
    0
    Views:
    201
    Chris Rebert
    Sep 21, 2012
Loading...

Share This Page