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/2016-September/146427.html below:

[Python-Dev] Python 3.6 dict becomes compact and gets a private version; and keywords become ordered

[Python-Dev] Python 3.6 dict becomes compact and gets a private version; and keywords become ordered [Python-Dev] Python 3.6 dict becomes compact and gets a private version; and keywords become orderedChris Angelico rosuav at gmail.com
Mon Sep 12 12:51:29 EDT 2016
On Tue, Sep 13, 2016 at 2:27 AM, Gregory P. Smith <greg at krypto.org> wrote:
> Disorder for this purpose need not be a random shuffle (overkill). It just
> needs to be regularly inconsistent. A simple thing to do on top of 3.6's new
> dict implementation would be to pick a random starting point within the
> order array rather than offset 0 to start iteration from. That small change
> would be sufficient to guarantee that code depending on order must ask for
> order. It could even allow us to get people ready for iteration within the
> same process to become unstable.

Don't forget that .items(), .keys(), and .values() are all
synchronized, so you'd probably have to pick an offset at dict
creation and run with it forever after.

ChrisA
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