[Python-ideas] data structures should have an .any() method

Georg Brandl g.brandl at gmx.net
Sat Sep 5 18:53:07 CEST 2009


Yuvgoog Greenle schrieb:
> I can't stand map/reduce/lambda... *instant readable makeover*
> def minicomp(f1, f2):
>     def comped(*args, **kwargs):
>         return f1(f2(*args, **kwargs))
>     return comped
> 
> def compose(*funcs):
>     total = funcs[0]
>     for f in funcs[1:]:
>         total = minicomp(total, f)
>     return total

Please, if this must be discussed again, do it in a new thread.

cheers,
Georg


-- 
Thus spake the Lord: Thou shalt indent with four spaces. No more, no less.
Four shall be the number of spaces thou shalt indent, and the number of thy
indenting shall be four. Eight shalt thou not indent, nor either indent thou
two, excepting that thou then proceed to four. Tabs are right out.




More information about the Python-ideas mailing list