News for hackers. Stuff that matters.
Re:Widely useful Python utilities by Peter Norvig by mattj on Tuesday September 15, 2009 @02:46AM (#823415)
Said before, but any(pred(x) for x in xs) is too complex?
Re:Widely useful Python utilities by Peter Norvig by mccutchen on Wednesday September 16, 2009 @12:16AM (#825314)
Quoting myself, now: "Using a generator expression works just as well, though, and is probably clearer in the long run."

It's just that my first instinct is always to use all(xs, pred).