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/2017-December/151433.html below:

[Python-Dev] Guarantee ordered dict literals in v3.7?

[Python-Dev] Guarantee ordered dict literals in v3.7? [Python-Dev] Guarantee ordered dict literals in v3.7?Stephen J. Turnbull turnbull.stephen.fw at u.tsukuba.ac.jp
Thu Dec 21 22:51:36 EST 2017
Chris Barker writes:

 > Nathaniel Smith has pointed out that eval(pprint(a_dict)) is
 > supposed to return the same dict -- so documented behavior may
 > already be broken.

Sure, but that's because we put shoes on a snake.  Why anybody expects
no impediment to slithering, I don't know!

I understand the motivation to guarantee order, but it's a programmer
convenience that has nothing to do with the idea of mapping, and the
particular (insertion) order is very special and usually neither
relevant nor reproducible.  I have no problem whatsoever with just
documenting any failure to preserve order while reproducing dicts,
*except* that a process that inserts keys in the same order had better
result in the same insertion order.

Steve

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