Stackless Python and Python 2.x

Tim Peters tim.one at home.com
Sat Sep 1 18:11:44 EDT 2001


[Joal Heagney]
> Wasn't a big part of the generator addition that it supplies a
> simpler-to-understand solution to the majority of continuations
> solutions?

I expect that if you dug into all the applications using Stackless, you'd
find that the majority of them rely on full-blown coroutines or
microthreads.  It's unclear how far PEP 255's "Simple Generators" can be
pushed towards those specific ends.

Neil Schemenauer discovered that it was possible to code the "traditional"
coroutine examples using simple generators instead, and being able to
explicitly resume a generator object independent of magical control context
was key to that (an ability Icon generators and CLU iterators don't have, so
the limitations of the latter don't necessarily apply to Python's flavor of
the idea too).

But it remains unclear how far that can be pushed.  In any case, it wasn't
PEP 255's intent to kill off Stackless, but to get at many things you *can*
do with continuations for which continuations aren't *necessary*.  The
implementation changes needed to support simple generators were minor by any
measure, and the Jython folks believe it's doable on top of the JVM too.  In
bang for the buck, they're a big win, but it's not clear they reach Big Bang
status.

but-creating-a-new-universe-wasn't-their-goal-ly y'rs  - tim





More information about the Python-list mailing list