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 ammar2
Recipients Saps, ammar2, tim.peters
Date 2018-10-19.03:31:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1539919886.94.0.788709270274.issue35023@psf.upfronthosting.co.za>
In-reply-to
Content
Think about what it means to iterate over a hashmap. Let's say your pop() causes the dictionary to become smaller than the resizing threshold and now the indexes need to be rebuilt, how would this be handled gently by the iterator?

This situation is not just something unique to python dictionaries, google around for "delete while iterating" and you'll find that most languages prohibit you from mutating containers while iterating over them.
History
Date User Action Args
2018-10-19 03:31:26ammar2setrecipients: + ammar2, tim.peters, Saps
2018-10-19 03:31:26ammar2setmessageid: <1539919886.94.0.788709270274.issue35023@psf.upfronthosting.co.za>
2018-10-19 03:31:26ammar2linkissue35023 messages
2018-10-19 03:31:26ammar2create