no side effects

Michele Simionato mis6 at
Wed Jan 8 21:31:06 CET 2003

"Martin v. Löwis" <martin at> wrote in message news:<avhbmr$7ib$06$1 at>...
> More relevant is that each for loop introduces a hidden variable. This 
> hidden variable used to be an index into the sequence iterated over, and 
> now is an iterator object which draws the next element from the sequence.

I didn't know it was an iterator. Anyway, it is a smart one, since it
can go in the two senses,

>>> range(10,0,-2)
[10, 8, 6, 4, 2]



More information about the Python-list mailing list