On Mon, Sep 12, 2016 at 4:46 PM, Ethan Furman <et...@stoneleaf.us> wrote:
> Does anyone have a short explanation of the interaction between hash
> randomization and this new always ordered dict?  Why doesn't one make the
> other useless?

Before 3.6, dict iteration was based on the hash table, which varies
based on the hash seed.  The compact dict implementation separates the
hash table from the keys table (which preserves insertion order), and
iterates over the keys table.  So the hash table uses the same hash
randomization as before, but it no longer impacts iteration.

-eric
_______________________________________________
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

Reply via email to