Functional Programming
Aahz
aahz at pythoncraft.com
Mon Dec 30 15:39:02 EST 2002
More information about the Python-list mailing list
Mon Dec 30 15:39:02 EST 2002
- Previous message (by thread): Functional Programming
- Next message (by thread): Kees Blom's railroad program (was Re: C source viewer/mapper?)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
In article <x7k7hs9nb7.fsf at guru.mired.org>, Mike Meyer <mwm at mired.org> wrote: > >class curry: > def __init__(self, func, *fixed_args): > self.func = func > self.fixed_args = fixed_args > > def __call__(self, *variable_args): > return apply(self.func, self.fixed_args + variable_args) Just as a reminder: def __call__(self, *variable_args): return self.func( *(self.fixed_args + variable_args) ) -- Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/ "There are three kinds of lies: Lies, Damn Lies, and Statistics." --Disraeli
- Previous message (by thread): Functional Programming
- Next message (by thread): Kees Blom's railroad program (was Re: C source viewer/mapper?)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list