Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: Functional way to compare things inside a list

Reply
Thread Tools

Re: Functional way to compare things inside a list

 
 
Chris Angelico
Guest
Posts: n/a
 
      09-21-2012
On Fri, Sep 21, 2012 at 6:28 PM, Chris Rebert <(E-Mail Removed)> wrote:
> On Fri, Sep 21, 2012 at 1:23 AM, Chris Angelico <(E-Mail Removed)> wrote:
>> On Fri, Sep 21, 2012 at 8:58 AM, <(E-Mail Removed)> 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/funct...ctools.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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Functional way to compare things inside a list thorsopia@lavabit.com Python 15 09-23-2012 04:09 AM
Re: Functional way to compare things inside a list Chris Rebert Python 0 09-21-2012 08:33 AM
Re: Functional way to compare things inside a list Chris Rebert Python 0 09-21-2012 08:28 AM
Re: Functional way to compare things inside a list Chris Angelico Python 0 09-21-2012 08:23 AM
Making things more functional in Python gf gf Python 6 03-05-2005 07:28 AM



Advertisments