This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author georg.brandl
Recipients Ian, chris.jerdonek, docs@python, georg.brandl, serhiy.storchaka
Date 2012-10-14.18:31:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1350239474.17.0.0581517384868.issue16225@psf.upfronthosting.co.za>
In-reply-to
Content
Well, I guess Serhiy meant "neither increase nor decrease".

In the end, the exact behavior will never be clear if you don't state explicitly how it's implemented: a counter that starts at 0 and is increased on __next__ until it's equal to len(list) (as checked at every iteration step).  But in general the advice should be: if you want to insert or remove elements during iteration, iterate over a copy.
History
Date User Action Args
2012-10-14 18:31:14georg.brandlsetrecipients: + georg.brandl, chris.jerdonek, docs@python, serhiy.storchaka, Ian
2012-10-14 18:31:14georg.brandlsetmessageid: <1350239474.17.0.0581517384868.issue16225@psf.upfronthosting.co.za>
2012-10-14 18:31:14georg.brandllinkissue16225 messages
2012-10-14 18:31:14georg.brandlcreate