[docs] [issue16225] list.remove in for loop

Chris Jerdonek report at bugs.python.org
Sun Oct 14 20:14:31 CEST 2012


Chris Jerdonek added the comment:

> It is safe to modify a sequence during iteration if it's size not increased.

What do you mean by "safe"?  The example given by the original commenter does not increase the size either.  I believe "safe" is meant in the sense of avoiding possibly unexpected behavior.  I can clarify the language if you feel it is ambiguous.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16225>
_______________________________________


More information about the docs mailing list