This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author arigo
Recipients arigo, nikratio, rhettinger
Date 2013-10-27.21:58:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1382911126.57.0.596309993289.issue19414@psf.upfronthosting.co.za>
In-reply-to
Content
Modifying an ordered dict while iterating over it can be officially classified as an ok think to do, but then the precise behavior must described in the documentation in some details, with of course matching implementation(s) and tests.  I mean by that that the behavior should not be "it might miss some elements", but rather something precise like: consider the ordered dict as simply a list of its elements, and consider __delitem__ as replacing an element with NULL.  Then forward or backward iteration works like forward or backward iteration over this list, with the additional rule that NULL elements are skipped over.

It would imho be a good possible solution, but it obviously requires more effort.
History
Date User Action Args
2013-10-27 21:58:46arigosetrecipients: + arigo, rhettinger, nikratio
2013-10-27 21:58:46arigosetmessageid: <1382911126.57.0.596309993289.issue19414@psf.upfronthosting.co.za>
2013-10-27 21:58:46arigolinkissue19414 messages
2013-10-27 21:58:46arigocreate