9 ms·
What is special about Python's yield statement compared to the ones in Ruby, C#, and other languages?
by joechung 17y ago
What is special about Python's yield statement compared to the ones in Ruby, C#, and other languages?
- ams6110 17y agoAlso Lua
- seiji 17y agoI'm not sure why you were down voted. An excellent overview of coroutines in general, and specifically as they are used in Lua, is http://www.inf.puc-rio.br/~roberto/docs/MCC15-04.pdf http://www.inf.puc-rio.br/~roberto/docs/MCC15-04.pdf
- camccann 17y agoMore significantly, continuations are a strict superset of coroutines, so standard Python is actually less powerful in this regard than languages with full continuation support, which if memory serves me includes Ruby, Smalltalk, and Scheme among others.
- wglb 17y agoEr, limitations of my knowledge, as I have done more in python than the other two. My bad.