Is the behavior expected?

Michele Simionato michele.simionato at gmail.com
Thu Nov 27 04:21:39 EST 2008


On Nov 27, 10:11 am, Lawrence D'Oliveiro <l... at geek-
central.gen.new_zealand> wrote:
> Michele Simionato wrote:
> > Guido and the Common Lisp implementors are happy with mutating the loop
> > index. I myself prefer the functional way.
>
> I'd agree with you, except Python doesn't provide any way to create user-defined constants, so constant loop indices have no precedent.

I do not understand if I should interpret your sentence as sarcasm or
what.
Looping without mutating the loop index is perfectly possible. For
instance
look at the first paragraph of http://www.artima.com/weblogs/viewpost.jsp?thread=239699



More information about the Python-list mailing list