]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Mention `frozendict` in `object.__hash__()` documentation (#148867)
authorJonathan Dung <jonathandung@yahoo.com>
Mon, 8 Jun 2026 11:39:41 +0000 (19:39 +0800)
committerGitHub <noreply@github.com>
Mon, 8 Jun 2026 11:39:41 +0000 (12:39 +0100)
Doc/reference/datamodel.rst

index 8d1704a448e6394fcfac2b146a4f5544a232f50d..2a961a062780f461524bb072bef1d54e49d8c301 100644 (file)
@@ -2230,12 +2230,12 @@ Basic customization
       pair: built-in function; hash
 
    Called by built-in function :func:`hash` and for operations on members of
-   hashed collections including :class:`set`, :class:`frozenset`, and
-   :class:`dict`.  The ``__hash__()`` method should return an integer. The only required
-   property is that objects which compare equal have the same hash value; it is
-   advised to mix together the hash values of the components of the object that
-   also play a part in comparison of objects by packing them into a tuple and
-   hashing the tuple. Example::
+   hashed collections including :class:`set`, :class:`frozenset`, :class:`dict`,
+   and :class:`frozendict`. The ``__hash__()`` method should return an integer.
+   The only required property is that objects which compare equal have the same
+   hash value; it is advised to mix together the hash values of the components
+   of the object that also play a part in comparison of objects by packing them
+   into a tuple and hashing the tuple. Example::
 
        def __hash__(self):
            return hash((self.name, self.nick, self.color))