Re: [Python-Dev] Some new additions to functools

2007-04-15 Thread Guido van Rossum
On 4/15/07, SevenInchBread <[EMAIL PROTECTED]> wrote: [...] > -- > "What's money? A man is a success if he gets up in the morning and goes to > bed at night and in between does what he wants to do." ~ Bob Dylan If you ask me, SevenInchBread (not her real name) is a Troll. Let her prove she isn't.

Re: [Python-Dev] Some new additions to functools

2007-04-15 Thread Paul Hankin
On 4/15/07, SevenInchBread <[EMAIL PROTECTED]> wrote: > So I've cooked up some very simple functions to add to functools - to expand > it into a more general-purpose module. > > def cat(x): return x > > class nullfunc(object): > def __call__(self, *args, **kargs): return self > def __getatt

Re: [Python-Dev] Some new additions to functools

2007-04-15 Thread Josiah Carlson
SevenInchBread <[EMAIL PROTECTED]> wrote: > So I've cooked up some very simple functions to add to functools - to expand > it into a more general-purpose module. [snip] I don't use a functional approach very often, but I haven't ever had a case where I would want or need to use any of the functio

[Python-Dev] Some new additions to functools

2007-04-15 Thread SevenInchBread
So I've cooked up some very simple functions to add to functools - to expand it into a more general-purpose module. def cat(x): return x class nullfunc(object): def __call__(self, *args, **kargs): return self def __getattr__(self, name):return getattr(None, name) def multimap(fun