File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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))
You can’t perform that action at this time.
0 commit comments