Can someone provide me with a brief introduction on how to use Python generators to implement coroutines?
+10
A:
I suggest you start here:
Coroutines via Enhanced Generators
http://www.python.org/dev/peps/pep-0342/
By Guido van Rossum and Phillip J. Eby
gahooa
2009-02-19 05:44:21
+6
A:
Use the google, Luke.
The latest release of Python (version 2.5) has a new feature called coroutines. This post looks at what coroutines are and how to use them. ...
bendin
2009-02-19 05:52:09
"The latest release of Python (version **2.5**)"... Uhh...
Evan Fosmark
2009-02-19 05:53:18
The quoted blog article was written April 2007. You don't have to even follow the link to see that, just look at the URL. Python 2.6 wasn't released until October 1, 2008.
bendin
2009-02-19 06:30:00
The differences between Python 2.6 and 2.5 are small enough that a 2007 article is NOT uselessly out of date.
S.Lott
2009-02-19 12:13:01
and actually this article is a **great** brief introduction to generators and coroutines!
Davide
2009-12-16 22:10:39
+14
A:
This was presented about a month after this question: http://www.dabeaz.com/coroutines/index.html
Dave's presentation is excellent and explains exactly how coroutines can be made with Python 2.5+ - well recommended.
Eli Bendersky
2009-08-28 15:34:02
Oh wow, this is +10 (the link is my canonical reference for Python coroutines)
kaizer.se
2009-11-03 00:32:25