[issue24369] Using OrderedDict.move_to_end during iteration is problematic.

Eric Snow report at bugs.python.org
Wed Jun 3 20:35:40 CEST 2015


Eric Snow added the comment:

Here's a patch that tracks changes to the C OrderedDict linked list, similar to how it's done in deque.  I've left the pure Python OrderedDict alone.

@Raymond, that state counter works great. :)

----------
keywords: +patch
stage: test needed -> patch review
Added file: http://bugs.python.org/file39610/issue24369-iteration-mutation.diff

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


More information about the Python-bugs-list mailing list