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.
2 parents bea12f4 + 2be9889 commit af4e5d9Copy full SHA for af4e5d9
1 file changed
Doc/reference/expressions.rst
@@ -1415,6 +1415,10 @@ some consistency rules, if possible:
1415
sequences, but not to sets or mappings). See also the
1416
:func:`~functools.total_ordering` decorator.
1417
1418
+* The :func:`hash` result should be consistent with equality.
1419
+ Objects that are equal should either have the same hash value,
1420
+ or be marked as unhashable.
1421
+
1422
Python does not enforce these consistency rules. In fact, the not-a-number
1423
values are an example for not following these rules.
1424
0 commit comments