Revisiting Generators and Subgenerators

Winston winstonwolff at gmail.com
Fri Mar 26 17:34:42 EDT 2010


On Mar 26, 7:29 am, Sebastien Binet <seb.bi... at gmail.com> 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)http://code.google.com/p/pycsp
>
> 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.

-Winston



More information about the Python-list mailing list