0
from collections import Hashable

issubclass(list, object)      # True
issubclass(object, Hashable)  # True
issubclass(list, Hashable)    # False

I thought that inheritance was a transitive relationship. So if "A inherits from B" and "B inherits from C" then "A inherits from C".

How come lists are not hashable considering that objects carry hash among their attribute?

0 Answers0