fiber(cooperative multi-threading)
Duncan Booth
duncan.booth at invalid.invalid
Sun Dec 23 14:53:14 EST 2007
Michael Sparks <ms at cerenity.org> wrote:
> Duncan Booth wrote:
>
>> Unfortunately generators only save a single level of stack-frame, so
>> they are not really a replacement for fibers/coroutines. The OP
>> should perhaps look at Stackless Python or Greenlets. See
>
> On the surface of things, the single level aspect *LOOKS* like a
> problem, but in fact is actually really useful. The reason is because
> it encourages a generator to be relatively simple and focused
> encouraging reuse.
>
Ah, perhaps Python should similarly limit function call nesting to one
level so as to keep things simple and encourage reuse.
More information about the Python-list
mailing list