Skip to content

Commit 0f964f4

Browse files
[3.15] Mention frozendict in object.__hash__() documentation (GH-148867) (#151077)
(cherry picked from commit e376211) Co-authored-by: Jonathan Dung <jonathandung@yahoo.com>
1 parent 1f3ee92 commit 0f964f4

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

Doc/reference/datamodel.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2230,12 +2230,12 @@ Basic customization
22302230
pair: built-in function; hash
22312231

22322232
Called by built-in function :func:`hash` and for operations on members of
2233-
hashed collections including :class:`set`, :class:`frozenset`, and
2234-
:class:`dict`. The ``__hash__()`` method should return an integer. The only required
2235-
property is that objects which compare equal have the same hash value; it is
2236-
advised to mix together the hash values of the components of the object that
2237-
also play a part in comparison of objects by packing them into a tuple and
2238-
hashing the tuple. Example::
2233+
hashed collections including :class:`set`, :class:`frozenset`, :class:`dict`,
2234+
and :class:`frozendict`. The ``__hash__()`` method should return an integer.
2235+
The only required property is that objects which compare equal have the same
2236+
hash value; it is advised to mix together the hash values of the components
2237+
of the object that also play a part in comparison of objects by packing them
2238+
into a tuple and hashing the tuple. Example::
22392239

22402240
def __hash__(self):
22412241
return hash((self.name, self.nick, self.color))

0 commit comments

Comments
 (0)