6 ms·
But you're also pushing data back in. Generators are coroutines that can be suspended and resumed, and the yield keyword is a mechanism for two way communicatio
by pault 7y ago
But you're also pushing data back in. Generators are coroutines that can be suspended and resumed, and the yield keyword is a mechanism for two way communication between the routine and coroutine.
- Waterluvian 7y agoTrue. The idea doesn't hold as well now that data can be passed into a generator in Python. Ie. Now that there's coroutines.