On Mon, 18 Jun 2018 06:13:15 -0700 Ethan Furman <et...@stoneleaf.us> wrote:
> I'm sure we've already had this conversation, but my google-fu is failing me. > > Can someone provide a link to a discussion explaining why the new ordering of > dictionaries does not defeat the > hash-randomization non-ordering we added a few versions ago? Because the aim of hash randomization was not to make iteration order unpredictable, it was to make hash collisions unpredictable. The solution used to make hash collisions unpredictable was to make hash values themselves unpredictable, and that had the side effect of also making iteration order unpredictable. But the new dict implementation is able to provide a deterministic iteration order even with non-deterministic hash values. Regards Antoine. _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com