Raymond Hettinger added the comment:

> > 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.

----------
nosy: +rhettinger

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue16225>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to