Eric Lippert <ericlipp...@gmail.com> added the comment:

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."

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue34551>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to