On Jun 9, 12:16 pm, James Stroud <[EMAIL PROTECTED]> wrote: > Terry Reedy wrote: > > In Python, you have a choice of recursion (normal or tail) > > Please explain this. I remember reading on this newsgroup that an > advantage of ruby (wrt python) is that ruby has tail recursion, implying > that python does not. Does python have fully optimized tail recursion as > described in the tail recursion Wikipedia entry? Under what > circumstances can one count on the python interpreter recognizing the > possibility for optimized tail recursion? >
I'm afraid Terry is wrong here, at least if he meant that CPython had tail recursion *optimization*. (and just for those who don't know yet, it's not a shortcoming, it's a design choice.) -- http://mail.python.org/mailman/listinfo/python-list