[issue19823] for-each on list aborts earlier than expected
cost6 added the comment: Sorry for that, i will move it to python-list. -- resolution: -> works for me status: open -> closed ___ Python tracker <http://bugs.python.org/i
[issue19823] for-each on list aborts earlier than expected
New submission from cost6: for-each does not iterate over all entries of collection, if one removes elements during the iteration. Example (misbehaving) code: def keepByValue(self, key=None, value=[]): for row in self.flows: if not row[key] in value: flows.remove(row