[docs] [issue16225] list.remove in for loop
report at bugs.python.org
Mon Oct 15 01:00:23 CEST 2012
Serhiy Storchaka added the comment:
> I agree. I removed the word "safe" in the patch I attached to reduce
Yes, so much the better.
It will be nice somewhere in deep clarify for experts what happens with list
iterator if the list changed.
And iterating over modifyed (if you insert/remove keys, but not when you only
update values) dict or set really yield unexpected results (i.e. they expected
in them undefinability). This is really not recommended.
Python tracker <report at bugs.python.org>
More information about the docs