Eric V. Smith <e...@trueblade.com> added the comment:

You should not mutate a list while iterating over it.

See, for example 
https://stackoverflow.com/questions/6260089/strange-result-when-removing-item-from-a-list

I couldn't find a place where this is mentioned in the python list docs. If 
it's not there, we should add something to the programming FAQ.

----------
nosy: +eric.smith

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

Reply via email to