Stackless Python 0.2

Christian Tismer
Wed, 23 Jun 99 18:03:22 GMT


               Stackless Python 0.2
           A Python Implementation Which
             Does Not Ese The C Stack

What is it?
A plugin-replacement for core Python.
It should run any program which runs under Python 1.5.2 .
But it does not need space on the C stack.

Why did I write it?
Stackless Python was never written before (afaik), since it
was said to be impossible without major rewrites of core Python.
I am proving the controverse:
It is easy to write, just hard to think.

Who needs it?
At the moment, this is only useful for C programmers
who want to try certain new ideas. Hardcore stuff.
It allows to modify the current execution state by
changing the frame stack chain without restictions,
and it allows for pluggable interpreters on a per-frame-basis.

The possibilities are for instance:

Coroutines, Continuations, Generators

Restartable exceptions and Persistent execution state
might be possible.

Stackless extension modules can be built. The new builtin
stackless "map" function is a small example for this.

Coroutines will be able to run at the speed of
a single C function call, which makes them a considerable
alternative in certain algorithms.

Status of the project:
Stackless-ness has been implemented and tested with pystone.
pystone works correctly and is about 4-5 % slower than
with standard Python.

What I need at the moment is
- time to build a sample coroutine extension
- your input, your testing, critics and hints.

Some still rough documentation is available at

Source code and a VC++6.0 build for Windows can be found
from the document or directly from

cheers - chris

Christian Tismer             :^)   <>
Applied Biometrics GmbH      :     Have a break! Take a ride on Python's
Kaiserin-Augusta-Allee 101   :    *Starship*
10553 Berlin                 :     PGP key ->
PGP Fingerprint       E182 71C7 1A9D 66E9 9D15  D3CC D4D7 93E2 1FAE F6DF
     we're tired of banana software - shipped green, ripens at home

<P><A HREF="">Stackless Python
0.2</A> - a version of Python 1.5.2 that does not need space on the C
stack.  (12-Jun-99)

----------- comp.lang.python.announce (moderated) ----------
Article Submission Address:
Python Language Home Page:
Python Quick Help Index: