No, it's not a bug, as stated in the help text of the hash function:
>>> help(hash)
Help on built-in function hash in module builtins:
hash(obj, /)
Return the hash value for the given object.
Two objects that compare equal must also have the same hash value, but the
reverse is not necessarily true.
i.e., It's not necessarily true that two objects that have the same hash value compare equal.
Interestingly, the documentation has a different wording and doesn't explicitly mention this, it only says
Numeric values that compare equal have the same hash value
No, it's not a bug, as stated in the help text of the
hash
function:i.e., It's not necessarily true that two objects that have the same hash value compare equal.
Interestingly, the documentation has a different wording and doesn't explicitly mention this, it only says