From: Terry Jan Reedy Date: Fri, 12 Jun 2015 20:38:57 +0000 (-0400) Subject: Issue #24406: Add sentences on dict comparisons, similar to those for Sequence X-Git-Tag: v3.5.0b3~70^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fe63c9a29812449cca5a058c74ab831a89b7b117;p=python Issue #24406: Add sentences on dict comparisons, similar to those for Sequence and set comparisions. Patch by Gareth Rees. --- diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index fc6d020699..0636686672 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -3905,6 +3905,10 @@ pairs within braces, for example: ``{'jack': 4098, 'sjoerd': 4127}`` or ``{4098: Return a new view of the dictionary's values. See the :ref:`documentation of view objects `. + Dictionaries compare equal if and only if they have the same ``(key, + value)`` pairs. Order comparisons ('<', '<=', '>=', '>') raise + :exc:`TypeError`. + .. seealso:: :class:`types.MappingProxyType` can be used to create a read-only view of a :class:`dict`.