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 Eric Lippert
Recipients Eric Lippert, serhiy.storchaka, tim.peters, vstinner
Date 2018-08-31.17:21:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1535736083.77.0.56676864532.issue34551@psf.upfronthosting.co.za>
In-reply-to
Content
If it were possible that the interpreter iterating over a dictionary could cause the dictionary to change size then I suspect that this would be a rich source of bugs to mine. :-) 

It would be great if we could make it a documented, enforced invariant that the interpreter reading a dictionary never produces a side effect visible to the interpreter.

Re: "this specific statement already existed before my work."

Thanks for the historical note; the first thing I thought when I read this line was "that's got to be a copy-paste left over from an earlier version of the algorithm."
History
Date User Action Args
2018-08-31 17:21:23Eric Lippertsetrecipients: + Eric Lippert, tim.peters, vstinner, serhiy.storchaka
2018-08-31 17:21:23Eric Lippertsetmessageid: <1535736083.77.0.56676864532.issue34551@psf.upfronthosting.co.za>
2018-08-31 17:21:23Eric Lippertlinkissue34551 messages
2018-08-31 17:21:23Eric Lippertcreate