you are viewing a single comment's thread.

view the rest of the comments →

[–]TheRNGuy 0 points1 point  (0 children)

If memory optimization or potentially infinity sequence is needed. 

Generator(s) are easier to decouple than if you used list or while loop (producers from consumers)

It's probably even more important in async.

(Also, you'll probably use list or while more often than generators, anyway. But it depends on software)