Chris Angelico wrote:
It is an error to mutate the dictionary *and then continue to iterate over it*.

But if you're processing the last key, and you add one so
that it's no longer the last key, what should happen?

My feeling is that this should be an error, because it's
not clear whether iteration should stop at that point
or not.

--
Greg
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to