HN
Hacker News
Top
New
Best
Ask
Show
Jobs
Comment by mattj | Hacker News Reader
Parent
Full thread
mattj
·
Said before, but any(pred(x) for x in xs) is too complex?
View on HN
mccutchen
·
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).
Reply on news.ycombinator.com