A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2018-June/153921.html below:

[Python-Dev] the new(-ish) dict ordering vs hash randomization

[Python-Dev] the new(-ish) dict ordering vs hash randomization [Python-Dev] the new(-ish) dict ordering vs hash randomizationAntoine Pitrou solipsis at pitrou.net
Mon Jun 18 09:21:40 EDT 2018
On Mon, 18 Jun 2018 06:13:15 -0700
Ethan Furman <ethan at 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.


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4