In newer version of Python, you can send values to Generators with generator.send()
, which makes python Generators effectively coroutines.
The main difference between python Generator, and other generator, say greenlet, is that in python, your yield value
can only return back to the caller. While in greenlet, target.switch(value)
can…
Top comments (0)