Info on continuations?

Jean-Paul Calderone exarkun at divmod.com
Tue Aug 8 11:37:59 EDT 2006


On 8 Aug 2006 08:07:02 -0700, olsongt at verizon.net wrote:
>
>vasudevram wrote:
>> Hi,
>>
>> I am Googling and will do more, found some stuff, but interested to get
>> viewpoints of list members on:
>>
>> Continuations in Python.
>>
>> Saw a few URLs which had some info, some of which I understood. But
>> like I said, personal viewpoints are good to have.
>>
>> Thanks
>> Vasudev
>
>Could you be a little more specific on what you're looking for?
>Continuations are a big can of worms.
>
>In general, some of the historical uses of continuations are better
>represented as classes in python.  Generators provide some limited
>functionality as well, and will be able to send info both ways in
>python 2.5 to enable limited co-routines.  Stackless python allows you

Coroutines can switch out of stacks deeper than one frame.  Generators
cannot, even in Python 2.5.  You seem to be partially aware of this,
given your comments below, but have suffered some of the confusion PEP
342's naming seems intended to generate.

Python doesn't have continuations or coroutines at all.  It has generators,
and calling them anything else (even "limited coroutines" - depending on
what "limited" means (which no one really knows), Python 2.4 already had
these - the ability to pass information into a generator is not new, only
the syntax by which to do it is) can't help but lead to misunderstandings.

>to *really* suspend the stack at a given time and do a bunch of crazy
>stuff, but doesn't currently support 'full continuations'.
>

Jean-Paul



More information about the Python-list mailing list