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 nikratio
Recipients arigo, ethan.furman, nikratio, rhettinger
Date 2013-10-30.19:43:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Hmm. I see your point. You might be right (I'm not fully convinced yet though), but this bug is probably not a good place to go into more detail about this.

So what would be the best way to fix the immediate problem this was originally about? Raise a RuntimeError (as Armin suggested), or just end the iteration? 

Note that RuntimeError would only be raised when the current element is removed from the dict, and the ordered dict would still tolerate other kinds of modifications.

Both variants would also be a change from previous behavior (were removing the current elements works as long as you do not remove the next one as well).

The minimally intrusive change would be to skip over elements that have been removed, but that comes at the expense of an additional membership test in each iteration.
Date User Action Args
2013-10-30 19:43:18nikratiosetrecipients: + nikratio, arigo, rhettinger, ethan.furman
2013-10-30 19:43:18nikratiosetmessageid: <>
2013-10-30 19:43:18nikratiolinkissue19414 messages
2013-10-30 19:43:18nikratiocreate