From: Steve Holden on
Winston wrote:
[...]
> This new syntax for a generator will break all existing
> programs. But we happen to be at the start of Python 3K where
> new paradaigms are
> being examined.

However good your idea may be, I suspect this one sentence will kill it.

We are no longer "at the start of Py3k", we are moving towards the third
release, and there is already a substantial body of code and literature
embodying the current syntax.

So you would need to reformulate your proposals to incorporate backward
compatibility.

regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
See PyCon Talks from Atlanta 2010 http://pycon.blip.tv/
Holden Web LLC http://www.holdenweb.com/
UPCOMING EVENTS: http://holdenweb.eventbrite.com/

From: Sebastien Binet on
On Mar 25, 10:39 pm, Winston <winst...(a)stratolab.com> wrote:
> Here's my proposal again, but hopefully with better formatting so you
> can read it easier.
>
> -Winston
> -----------------
>
> 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.
From: Winston on
On Mar 26, 7:29 am, Sebastien Binet <seb.bi...(a)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
From: Cameron Simpson on
On 26Mar2010 07:29, Sebastien Binet <seb.binet(a)gmail.com> wrote:
| On Mar 25, 10:39 pm, Winston <winst...(a)stratolab.com> wrote:
| > A Baton object for generators to allow subfunction to yield, and to
| > make them symetric.
|
| isn't a Baton what CSP calls a channel ?

I was thinking about this (roughly) in the shower this morning before
seeing this message.

One difference is that a Channel or zero-storage Queue lets the putter
continue execution after the put (or at least the other side's get). A
co-routine won't proceed until later, no? So a co-routine setup will do
lazier computation than a similar threaded setup.

Cheers,
--
Cameron Simpson <cs(a)zip.com.au> DoD#743
http://www.cskk.ezoshosting.com/cs/

Principles have no real force except when one is well fed. - Mark Twain