"Eric Abrahamsen" <[EMAIL PROTECTED]> wrote

So that's why I'm creating the iterator outside of the while loop in the original code, and then using a repeated for loop with a break to step through all the events only once. Of course, the fact that 5 isn't in there probably points to the source of my problems! The solution might be assigning iterlist.next() to a variable, and advancing the variable.

In that case wouldn't it be simpler to just use the index and
manually control its value? Iterators are wonderful things but
when I have to start bending things too far from vanilla I tend
to go back to first principles.

--
Alan Gauld
Author of the Learn to Program web site
http://www.freenetpages.co.uk/hp/alan.gauld

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to