Ethan Furman added the comment:
The further from dict it goes, the more there is to remember. Considering the
work around is so simple, I just don't think it's worth it:
for key in list(ordered_dict):
if some_condition:
del ordered_dict[key]
A simple list around the dict and we're good to go; and this trick works with
dicts, defaultdicts, sets, lists (when you don't want the skipping behavior),
etc.
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue19414>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com