Skip to content
Better HN
Top
New
Best
Ask
Show
Jobs
Search
⌘K
undefined | Better HN
0 points
ospohngellert
7y ago
0 comments
Share
The first one is clearly easier to read than the second. However the first one is slow. I believe fast_any is easier to read than generator code.
0 comments
default
newest
oldest
ospohngellert
OP
7y ago
Actually, apologies I see now. I always associated generator's with the `yields` keyword, but maybe I have to look into them again. Thanks!
detaro
7y ago
The first
IS
generator code. That's a generator expression, note that it does not have the [] of a list expression.
j
/
k
navigate · click thread line to collapse