4 ms·
Yeah, that's true. Maybe I'm being narrow minded and not "Pythonic" enough, but I always end up writing predicates. I can see that non-trivial predicate functio
by cup-of-tea 9y ago
Yeah, that's true. Maybe I'm being narrow minded and not "Pythonic" enough, but I always end up writing predicates. I can see that non-trivial predicate functions could be changed to non-trivial functions that return something which can later be compared to get the boolean. But what about having a list of of predicates and wanting to test them all at once. all(p(x) for p in predicates) seems perfect for this...