[Python-ideas] startsin ?

Stephen J. Turnbull stephen at xemacs.org
Sat Oct 1 07:19:50 CEST 2011


Mike Graham writes:

 > I wonder if it might be worthwhile to give any and all two-parameter API for
 > predicate functions, so that
 > 
 >     any(f, xs)
 > 
 > is the same as
 > 
 >     any(f(x) for x in xs)
 > 
 > This eliminates some really common boilerplate, but it adds complication and
 > has an ugly API.

-1.  The comprehension is not just boilerplate, it's documentation.



More information about the Python-ideas mailing list