Tim Peters <[email protected]> added the comment:
This won't be changed. The effect on the iteration order of adding and/or
removing keys from a dict while iterating over it has never been defined in
Python, and never will be. The Python 3 docs for dict views say this clearly:
"""
Iterating views while adding or deleting entries in the dictionary may raise a
RuntimeError or fail to iterate over all entries.
"""
You're experiencing the second symptom ("fail to iterate over all entries").
It's expected. If you can't do the time, don't do the crime ;-)
----------
nosy: +tim.peters
status: pending -> closed
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue35023>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com