@@ -1026,9 +1026,9 @@ Comparison of objects of the same type depends on the type:
10261026 ``x <= y ``. If the corresponding element does not exist, the shorter
10271027 sequence is ordered first (for example, ``[1,2] < [1,2,3] ``).
10281028
1029- * Mappings (dictionaries) compare equal if and only if their sorted `` (key,
1030- value) `` lists compare equal. [ # ]_ Outcomes other than equality are resolved
1031- consistently, but are not otherwise defined. [ # ]_
1029+ * Mappings (dictionaries) compare equal if and only if they have the same
1030+ `` (key, value) `` pairs. Order comparisons `` ('<', '<=', '>=', '>') ``
1031+ raise :exc: ` TypeError `.
10321032
10331033* Sets and frozensets define comparison operators to mean subset and superset
10341034 tests. Those relations do not define total orderings (the two sets ``{1,2} ``
@@ -1310,15 +1310,6 @@ groups from right to left).
13101310 strings in a human recognizable way, compare using
13111311 :func: `unicodedata.normalize `.
13121312
1313- .. [# ] The implementation computes this efficiently, without constructing lists
1314- or sorting.
1315-
1316- .. [# ] Earlier versions of Python used lexicographic comparison of the sorted (key,
1317- value) lists, but this was very expensive for the common case of comparing
1318- for equality. An even earlier version of Python compared dictionaries by
1319- identity only, but this caused surprises because people expected to be able
1320- to test a dictionary for emptiness by comparing it to ``{} ``.
1321-
13221313 .. [# ] Due to automatic garbage-collection, free lists, and the dynamic nature of
13231314 descriptors, you may notice seemingly unusual behaviour in certain uses of
13241315 the :keyword: `is ` operator, like those involving comparisons between instance
0 commit comments