Generator syntax (Re: FW: FW: [Python-Dev] Simple generator implementation)

Thomas Wouters thomas@xs4all.net
Thu, 22 Mar 2001 12:14:48 +0100


On Thu, Mar 22, 2001 at 01:39:05PM +1200, Greg Ewing wrote:
> Fredrik Lundh <fredrik@effbot.org>:

> > I associate "yield" with non-preemptive threading (yield
> > to anyone else, not necessarily my caller).

> Well, this flavour of generators is sort of a special case
> subset of non-preemptive threading, so the usage is not
> entirely inconsistent.

I prefer yield, but I'll yield to suspend as long as we get coroutines or
suspendable frames so I can finish my Python-embedded MUX with
task-switching Python code :-)

-- 
Thomas Wouters <thomas@xs4all.net>

Hi! I'm a .signature virus! copy me into your .signature file to help me spread!