On Sun, 15 Apr 2007 18:18:16 -0400, SevenInchBread <[EMAIL PROTECTED]> wrote:
>>>Do you have commit access? What's your real name?
>I prefer to remain pseudonymous, and I don't have commit access.
>
>Yeah... they're not terribly useful - more or less there for the sake of
>being there. Batteries in
> def cat(x): return x
>
> def multimap(func, s, n=2):
> assert n > 0, "n must be positive"
> return (map(func, seq)
> if n == 1 else
> map(lambda x: multimap(func, x, n-1),
> seq))
>
> def multifilter(func, s, n=2):
> return multimap(lambda x: fi
Do you have commit access? What's your real name?
I prefer to remain pseudonymous, and I don't have commit access.
Yeah... they're not terribly useful - more or less there for the sake of
being there. Batteries included and all that
...but now I've got a more useful idea for a function wrapper
> So if it's alright with the privledged folk - I'd like to commit
> these minor (and probably non-controversial) additions to the functools
> module.
Do you have commit access? What's your real name?
-1 on these additions. If lambda x:x would be added, it should be named
"identity", not "cat
So if it's alright with the privledged folk - I'd like to commit these
minor (and probably non-controversial) additions to the functools module.
def cat(x): return x
def multimap(func, s, n=2):
assert n > 0, "n must be positive"
return (map(func, seq)
if n == 1 else