Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3ac5042 commit 8dbb0caCopy full SHA for 8dbb0ca
1 file changed
Doc/reference/expressions.rst
@@ -1255,6 +1255,10 @@ some consistency rules, if possible:
1255
sequences, but not to sets or mappings). See also the
1256
:func:`~functools.total_ordering` decorator.
1257
1258
+* The :func:`hash` result should be consistent with equality.
1259
+ Objects that are equal should either have the same hash value,
1260
+ or be marked as unhashable.
1261
+
1262
Python does not enforce these consistency rules. In fact, the not-a-number
1263
values are an example for not following these rules.
1264
0 commit comments