Making sense of Stackless

Christian Tismer tismer at
Thu Mar 9 23:07:27 CET 2000

Darrell wrote:
> It would be nice if I could do this.
> def classIterator(seq):
>     offset= -1
>     return continuation.current(1)
>     offset=offset+1
>     return seq[offset]
> The parm into current indicates I want the continuation to point just past
> this point.

This is included into continuations 0.8 which are about to be
published. It is even easier: Whatever I can express as a
function avoids to have to juggle with opcodes.
Here we go:


Does exactly what we need: Return ourself and be in position
to be called again.

ciao - chris

Christian Tismer             :^)   <mailto:tismer at>
Applied Biometrics GmbH      :     Have a break! Take a ride on Python's
Kaunstr. 26                  :    *Starship*
14163 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

More information about the Python-list mailing list