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/2012-January/115711.html below:

[Python-Dev] Changing the order of iteration over a dictionary

[Python-Dev] Changing the order of iteration over a dictionary [Python-Dev] Changing the order of iteration over a dictionaryFred Drake fdrake at acm.org
Fri Jan 20 12:11:47 CET 2012
On Fri, Jan 20, 2012 at 5:49 AM, Mark Shannon <mark at hotpy.org> wrote:
> So, don't be afraid to change that hash function :)

Definitely.

The hash function *has* been changed in the past, and a lot of developers
were schooled in not relying on the iteration order.  That's a good thing,
as those developers now write tests of what's actually important rather
than relying on implementation details of the Python runtime.

A hash function that changes more often than during an occasional major
version update will encourage more developers to write better tests.  We
can think of it as an educational tool.


  -Fred

-- 
Fred L. Drake, Jr.    <fdrake at acm.org>
"A person who won't read has no advantage over one who can't read."
   --Samuel Langhorne Clemens
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