Skip to content

Commit f085df1

Browse files
authored
add frozendict to 'hashed collections'
1 parent 09233bd commit f085df1

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
@@ -2210,12 +2210,12 @@ Basic customization
22102210
pair: built-in function; hash
22112211

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

22202220
def __hash__(self):
22212221
return hash((self.name, self.nick, self.color))

0 commit comments

Comments
 (0)