Proper tail recursion

Christopher T King squirrel at WPI.EDU
Wed Jul 7 20:27:24 EDT 2004


On Wed, 7 Jul 2004, Christopher T King wrote:

> Poking around in ceval.c, I discovered the PREDICT macros, and plan to
> make a preliminary implementation of tail calls using a similar test (use

I take that back. The intertwinement of C functions and Python calls on
the stack makes this nearly impossible -- there's no easy way to pop both
the C and Python stacks before calling the next function (it could be
partially done popping only the Python stack, though). Methinks tail calls 
will have to wait for Stackless.




More information about the Python-list mailing list