Python's "only one way to do it" philosophy isn't good?

Bruno Desthuilliers bruno.42.desthuilliers at wtf.websiteburo.oops.com
Mon Jun 11 04:37:26 EDT 2007


Terry Reedy a écrit :
> <bruno.desthuilliers at gmail.com> wrote in message 
> news:1181475395.749525.185520 at m36g2000hse.googlegroups.com...
> | > Terry Reedy wrote:
> | > > In Python, you have a choice of recursion (normal or tail)
> 
> [snip Stroud questions]
> 
> | I'm afraid Terry is wrong here, at least if he meant that CPython had
> | tail recursion *optimization*.
> 
> NO!!!
> I did not mean that or imply that in any way.

I understand you didn't mean it, but since the whole point of 
tail-recursion is allowing optimisation (else tail-recursion is nothing 
else than a subset of recursion), you somehow implied it, even while 
that was not your intention.

> |  (and just for those who don't know yet, it's not a shortcoming, it's a
> | design choice.)
> 
> And I already noted in a followup that I am working on a Python Papers 
> paper explaining that choice, including Guido's claim that 'for statements 
> are better'.
> 
> So frankly I am a little annoyed that you dragged my name into your answer 
> to Stroud when you should have succintly said 'No, Never', or better, 
> nothing at all, as someone else already did say that.  Read more of the 
> tread before jumping in and acribing ignorance to people.
> 

You're right on the fact that I should have read more of the thread 
before posting this (which I usually do), and I do apologize for this. 
But please note the second half of the sentence - which puts a strong 
precondition on the validity of the first part.





More information about the Python-list mailing list