[Chicago] PyCon 2006
Ian Bicking
ianb at colorstudy.com
Tue Sep 13 22:57:00 CEST 2005
Brian Ray wrote:
> BTW, what is Stackless?
>
> Is there a concise definition of Stackless Python?
Stackless: http://stackless.com/
Basically it's a version of Python (defunct at this point, really) where
the stack becomes a first-class object. So you can refer to the
execution-context-as-exists-right-now. This means things like
call-with-current-continuation (a Schemism) are possible.
I wrote something on continuations some time back:
http://blog.ianbicking.org/continuations-a-concrete-approach.html
that might be helpful.
You can do things like:
def ask_name():
name = get_response('name')
age = get_response('age')
print 'Hello', name, 'you are', age, 'years old'
Except where get_response() actually sends a web page to the user, waits
for their response by submitting the form, then returns the value they
gave. And if they respond with their name, then hit back, then
respond again, it'll all work (effectively rewinding the function back
to the get_response() that they are answering). This is the big feature
of systems like Seaside.
Some of what stackless can do will be made possible by PEP 342:
http://www.python.org/peps/pep-0342.html -- but not stuff like rewinding
a function.
--
Ian Bicking / ianb at colorstudy.com / http://blog.ianbicking.org
More information about the Chicago
mailing list