Python's "only one way to do it" philosophy isn't good?
nagle at animats.com
Sun Jun 10 18:20:10 CEST 2007
bruno.desthuilliers at gmail.com wrote:
> On Jun 9, 12:16 pm, James Stroud <jstr... at mbi.ucla.edu> 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.)
More information about the Python-list