example for PEP 342

Terry Reedy tjreedy at udel.edu
Mon Oct 27 16:38:27 EDT 2008


Severin wrote:
> Hello,
> 
> Is there a simple example demonstrating how to use the Trampoline from 
> PEP 342 (http://www.python.org/dev/peps/pep-0342/)?

In the examples section toward the end
   3. A simple co-routine scheduler or "trampoline" that lets
        coroutines "call" other coroutines by yielding the coroutine
        they wish to invoke. ...

I did not read if yet to see if it can be further simplified.




More information about the Python-list mailing list