We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b1f6902 commit 396ecb9Copy full SHA for 396ecb9
2 files changed
Doc/faq/design.rst
@@ -495,11 +495,7 @@ on the key and a per-process seed; for example, "Python" could hash to
495
to 1142331976. The hash code is then used to calculate a location in an
496
internal array where the value will be stored. Assuming that you're storing
497
keys that all have different hash values, this means that dictionaries take
498
-constant time -- O(1), in computer science notation -- to retrieve a key. It
499
-also means that no sorted order of the keys is maintained, and traversing the
500
-array as the ``.keys()`` and ``.items()`` do will output the dictionary's
501
-content in some arbitrary jumbled order that can change with every invocation of
502
-a program.
+constant time -- O(1), in computer science notation -- to retrieve a key.
503
504
505
Why must dictionary keys be immutable?
Doc/faq/programming.rst
@@ -1315,11 +1315,6 @@ that final assignment still results in an error, because tuples are immutable.
1315
Dictionaries
1316
============
1317
1318
-How can I get a dictionary to store and display its keys in a consistent order?
1319
--------------------------------------------------------------------------------
1320
-
1321
-Use :class:`collections.OrderedDict`.
1322
1323
I want to do a complicated sort: can you do a Schwartzian Transform in Python?
1324
------------------------------------------------------------------------------
1325
0 commit comments