Python 2.0 and Stackless

Christian Tismer tismer at appliedbiometrics.com
Sun Aug 6 09:38:48 EDT 2000


Michael Hudson wrote:
> 
> "Jeff Petkau" <jpet at eskimo.com> writes:
> 
> > For normal Python programs (that don't use stackless or uthreads),
> > the *only* effect of the stackless patch is to make Python faster
> > and more crash-resistant (since you can't overflow the C stack).
> 
> Hmm, only "sort-of".  I mean, yes, you won't overflow the C stack, but
> unbounded recursion is still a bug; with stackless you'll just sit
> there allocating frames until you chew through all available VM and
> then bomb out with a MemoryError (and spend about a day printing the
> traceback) - or segfault (Python isn't brilliant in low memory
> situations).

No problem. Thenext version includes a sys variable that controls
the maximum allowed recursion level. I'm further thinking of
a way to compress tracebacks in such a situation, since 10000
tracebacks scolling over your screen makes no sense.

> > So it's a complete win, no downside.
> 
> It makes the implementation more complex.  This is a real downside.
> That said, I think I'm in favour of it going in - it's just *cool*,
> and that's what I like about Python.  Sod technical arguments <wink>.

Thanks for your opinion.
While I don't agree that the implementation is really more
complex. First, it is already written and proved stable.
Second, not the implementation is complex, but rethinking
frames, recursion and stacks.

This is no issue about changing a little code, it is about
changing brains.

and-that-does-not-converge-in-all-cases-ly y'rs - chris

-- 
Christian Tismer             :^)   <mailto:tismer at appliedbiometrics.com>
Applied Biometrics GmbH      :     Have a break! Take a ride on Python's
Kaunstr. 26                  :    *Starship* http://starship.python.net
14163 Berlin                 :     PGP key -> http://wwwkeys.pgp.net
PGP Fingerprint       E182 71C7 1A9D 66E9 9D15  D3CC D4D7 93E2 1FAE F6DF
     where do you want to jump today?   http://www.stackless.com




More information about the Python-list mailing list