4 ms·
In newer version of Python, you can send values to Generators with generator.send(), which makes python Generators effectively coroutines.
by sktrdie 7y ago
In newer version of Python, you can send values to Generators with generator.send(), which makes python Generators effectively coroutines.
- comfydragon 7y agoGenerator send() was actually added way back in Python 2.5! [1] [1] https://docs.python.org/2.5/whatsnew/pep-342.html https://docs.python.org/2.5/whatsnew/pep-342.html