Most "active" coroutine library project?

Grant Edwards invalid at invalid.invalid
Fri Sep 25 17:42:48 CEST 2009

On 2009-09-25, Piet van Oostrum <piet at> wrote:
>>>>>> exarkun at (e) wrote:
>>e> I specifically left out all "yield" statements in my version, since that's
>>e> exactly the point here. :)  With "real" coroutines, they're not necessary -
>>e> coroutine calls look just like any other call.  With Python's enhanced
>>e> generators, they are.
> The first time I encountered coroutines was in Simula-67. Coroutine
> switching was certainly explicit there. IIRC, the keyword was resume.

I'm not sure exactly what "coroutine calls" refers to, but the
"mis-feature" in Python co-routines that's being discussed is
the fact that you can only yeild/resume from the main coroutine

You can't call a function that yields control back to the other
coroutine(s).  By jumping through some hoops you can get the
same effect, but it's not very intuitive and it sort of "feels
wrong" that the main routine has to know ahead of time when
calling a function whether that function might need to yield or

Grant Edwards                   grante             Yow! Where does it go when
                                  at               you flush?

More information about the Python-list mailing list