On Wed, Oct 2, 2019 at 8:29 AM Greg Ewing firstname.lastname@example.org wrote:
Chris Angelico wrote:
The hashability issue is a logical consequence of accepting that the above violations are reasonable and practically useful.
A more principled way to handle this wouild be for object not to be hashable, and have another base type for hashable objects. Hashable would then be a subtype of object, not the other way around.
The question then would be: why is object() not hashable? It can't be mutable, because then you violate LSP the other way (for the same reason frozenset isn't a subclass of set), and there'd be no logical reason for equality to be defined in any way that would violate hashability.