"Peter Hansen" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Dan Perl wrote: >> OTOH, I was thinking of saying in my previous posting that I prefer >> for n in range(start, 0, -1): >> to >> n = start >> while (n--) >> I think that the first form is more readable, although that may be just >> me. I would actually even prefer the 'for' statement in C to the 'while' >> statement: >> for (n=start; n<=0; n--) > > I'm not sure if it's just picking nits, but I'd like to > point out that neither of your alternatives is actually > equivalent to the while (n--) form... nor was Jeff > Shannon's attempt (in that case it leaves the loop with > n equal to 0, not -1).
You're right in your nit picking. I have to go back to using some C/C++ and Java also, I don't want to forget them completely. -- http://mail.python.org/mailman/listinfo/python-list