
Oct. 1, 2011
12:19 a.m.
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.