Python 2.0 and Stackless

Christian Tismer tismer at appliedbiometrics.com
Sun Aug 6 11:08:49 EDT 2000


Michael Hudson wrote:
> 
> Ah, you are listening :-)

:-)

...
> > 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.
> 
> Fair enough.  But infinite recursion is still a bug.  I don't have a
> stackless python built ATM, but does
> 
> class Crasher:
>  def __str__(self): print self
> 
> print Crasher()
> 
> get caught by stackless?  *Most* forms of infinite recursion don't
> crash the current implementation.  Some do, and IMHO that's a bug.

It will raise an exception after quite a lot of time, since I've
set the recursion limit to some huge amount. But you can change
the constant, it is in ceval.c .

> 
> > > > 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.
> 
> s/complex/further from what people are used to and thus harder to
> understand and modify for the bulk of the programming community/ then.

Ok, I agree. But then, the really hard stuff is in ceval.c only.
Forget about stackless map, this is not really needed.
I don't know many people who even ever looked into the core
interpreter, and everything else has only insignificant changes.

> > First, it is already written and proved stable.
> 
> I wasn't claiming it wasn't!

Surely not :-)

> > Second, not the implementation is complex, but rethinking frames,
> > recursion and stacks.
> 
> Which I claim makes some parts of the implementation (eg. builtin_map)
> more complicated.  I think it's cleaner in some conceptual ways, but
> because you're implementing it in C you have to jump through a variety
> of hoops to get what you want.

Right, and there is still no nice API to write stuff like
stackless map. But as said, just drop it, the old one works
just fine, unless somebody wants to tweak his brain about
the consequences of peeling a continuation out of a running
map (which works, btw).

> > This is no issue about changing a little code, it is about changing
> > brains.
> 
> Indeed!
> 
> Any chance of a patch against a recent CVS?

Are the relevant brains in CVS?

:-)


Yes, I'll doo it soon. Andreas Kostyrka has recently set up
a CVS for me, with the 1.7 patches. With a little work, this
will be 2.0 in a couple of days, and I'll publish it.

cheers - 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