Revisiting Generators and Subgenerators

Winston winstonwolff at
Fri Mar 26 22:34:42 CET 2010

On Mar 26, 7:29 am, Sebastien Binet < at> wrote:
> > Proposal for a new Generator Syntax in Python 3K--
> > A Baton object for generators to allow subfunction to yield, and to
> > make
> > them symetric.
> isn't a Baton what CSP calls a channel ?
> there is this interesting PyCSP library (which implements channels
> over greenlets, os-processes (via multiprocessing) or python threads)
> cheers,
> sebastien.

Thanks for the link. After reading about Greenlets, it seems my Baton
is a Greenlet. It is not passed in to the new greenlet as I wrote
above, but both sides use it to pass execution to the other, and to
send a value on switching.

I'm glad my thinking is matching other people's thinking. Now I have
to search for a greenlet written for Jython.

And thanks to others for their thoughts on this subject.


More information about the Python-list mailing list