Is Stackless Python DEAD?

Gordon McMillan gmcm at
Tue Nov 6 14:45:14 CET 2001

John S. Yates, Jr. wrote:

> On 5 Nov 2001 13:53:28 GMT, amk at (A.M. Kuchling)
> wrote: 
>>Not at all.  Stackless would have ramifications not just for a few
>>files in the core, but also for all the extension modules that come
>>with Python and for all the authors of third-party extension modules. 
> Is this because those extension modules would break?  Or because they
> would be sub-optimal until they took advantage of continuations?

You can't create a continuation in one execution of the interpreter
and use it in another. Recursions of the interpreter are very common
in Python - basically, anytime you execute Python code from C.

Stackless fixes some of these cases (turning recursion into iteration),
but leaves most of them untouched. In practice, it's not much of a 
problem - on the Stackless list, I think I've seen two or three posts
from people trying to create continuations inside an __init__ (which
doesn't work). It turns out to be easy to work around.

But making Python *truly* stackless means getting rid of all recursions,
and that is an enormous task. If you don't do that, you've got a 
language feature that doesn't work in some apparently random
set of circumstances.

There is still hope, I think, that something more general than 
Generators but less ambitious than Stackless will find it's way 
into the core.

- Gordon

More information about the Python-list mailing list