by convery · 3y ago · 0 comments
The only reason I can see is lowering the overhead of creating threads, at the cost of harder to read controlflow.
Also, generators can be used to turn traversal functions into iterators, which is often tedious to do by hand.