a simple example of Stackless Python

June Kim junaftnoon at nospamplzyahoo.com
Mon Oct 30 08:05:17 EST 2000


def looptest(n):
    this = continuation.current()
    k = this.update(n)
      # continuation at "="
    if k:
        this(k-1)
        # resuming at "="
    else:
        del this.link

Above is a simple example of continuation from Christian Tismer's
paper. (http://www.stackless.com/spcpaper.htm)
It seems like there are few people who understand Stackless Python
and the stuffs, and I'm not one of them. Can anyone explain me
this simple code? The paper was not very helpful for me to understand.
(esp, what does "this.update" do, and where does it mean exactly
by "at ="?)


Thanks in advance.

June




More information about the Python-list mailing list