In article <h0ahkb$he...@lust.ihug.co.nz>, Lawrence D'Oliveiro <l...@geek-central.gen.new_zealand> wrote: >In message ><78180b4c-68b2-4a0c-8594-50fb1ea2f...@c19g2000yqc.googlegroups.com>, Michele >Simionato wrote: >> >> The crux is in the behavior of the for loop: in Python there is a >> single scope and the loop variable is *mutated* at each iteration, >> whereas in Scheme (or Haskell or any other functional language) a new >> scope is generated at each iteration and there is actually a new loop >> variable at each iteration: no mutation is involved. > >I think it's a bad design decision to have the loop index be a variable >that can be assigned to in the loop.
Why? -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ "Given that C++ has pointers and typecasts, it's really hard to have a serious conversation about type safety with a C++ programmer and keep a straight face. It's kind of like having a guy who juggles chainsaws wearing body armor arguing with a guy who juggles rubber chickens wearing a T-shirt about who's in more danger." --Roy Smith, c.l.py, 2004.05.23 -- http://mail.python.org/mailman/listinfo/python-list