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 tim.peters
Recipients Saps, ammar2, tim.peters
Date 2018-10-19.03:14:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1539918847.32.0.788709270274.issue35023@psf.upfronthosting.co.za>
In-reply-to
Content
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 ;-)
History
Date User Action Args
2018-10-19 03:14:07tim.peterssetrecipients: + tim.peters, ammar2, Saps
2018-10-19 03:14:07tim.peterssetmessageid: <1539918847.32.0.788709270274.issue35023@psf.upfronthosting.co.za>
2018-10-19 03:14:07tim.peterslinkissue35023 messages
2018-10-19 03:14:07tim.peterscreate