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, serhiy.storchaka
Date 2014-01-08.05:05:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1389157557.24.0.47380535044.issue19414@psf.upfronthosting.co.za>
In-reply-to
Content
I have attached a patch that fixes this issue. Looking at Raymonds  comments in issue 19332, I have kept new code out of the critical path in __iter__ and instead modified the __delitem__ method (I assume that an element is removed only once, but may be iterated over many times). The updated __delitem__ now also updates the prev and next links of the removed item itself. When the current item is removed during an iteration, the iteration thus stops.

I hope that's an acceptable solution.
History
Date User Action Args
2014-01-08 05:05:57nikratiosetrecipients: + nikratio, arigo, rhettinger, ethan.furman, serhiy.storchaka
2014-01-08 05:05:57nikratiosetmessageid: <1389157557.24.0.47380535044.issue19414@psf.upfronthosting.co.za>
2014-01-08 05:05:57nikratiolinkissue19414 messages
2014-01-08 05:05:57nikratiocreate