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 rhettinger
Recipients Ian, chris.jerdonek, docs@python, georg.brandl, jcea, rhettinger, serhiy.storchaka
Date 2012-10-16.01:24:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1350350682.22.0.557455053444.issue16225@psf.upfronthosting.co.za>
In-reply-to
Content
> > It will be nice somewhere in deep clarify 
> > for experts what happens with list iterator if the list changed.

Resist the urge to over-specify.  Unless the behavior is tested and known to be consistent across all implementations, I'm content with the current docs:

"Note There is a subtlety when the sequence is being modified by the loop...."

Chris's currently patch seems reasonable to me and I don't think anything further is a good idea.

With nearly any data structure in any language, most programmers learn to be cautious about and generally avoid looping over a structure while mutating it.  Adding yet more documentation details won't make the issue go away.

I recommend posting the current patch and closing this issue to be done with it.
History
Date User Action Args
2012-10-16 01:24:42rhettingersetrecipients: + rhettinger, georg.brandl, jcea, chris.jerdonek, docs@python, serhiy.storchaka, Ian
2012-10-16 01:24:42rhettingersetmessageid: <1350350682.22.0.557455053444.issue16225@psf.upfronthosting.co.za>
2012-10-16 01:24:42rhettingerlinkissue16225 messages
2012-10-16 01:24:41rhettingercreate