[Python-Dev] Single- vs. Multi-pass iterability
Fri, 19 Jul 2002 16:42:34 +0200
> > I believe this is where the biggest debate lies: whether "for" =
> > non-destructive. I realize we are currently on the other side of =
> > fence, but i foresee enough potential pain that i would like you to
> > consider the value of keeping "for" loops non-destructive.
> for line in f.readlines():
> in any version of Python.
and? for-in doesn't modify the object returned
by f.readlines(), and never has.