I'm interested in knowing when (id(x), x) would be preferable over (type(x), x).
Something along these lines:
>>> class Point:
... def __init__(self, x, y):
... self.x = x
... self.y = y
... def __eq__(self, other):
... return self.x == other.x and self.y == other.y
... def __hash__(self):
... return 0 # Could make something better
...
...
>>> p1, p2, p3 = Point(1, 1), Point(2, 2), Point(1, 1)
>>> p1 == p2
False
>>> p1 == p3
True
>>> {p1, p2, p3}
{<__main__.Point object at 0x7f61f66a2d00>, <__main__.Point object at 0x7f61f66a2f10>}
-- The dead increasingly dominate and strangle both the living and the
not-yet born. Vampiric capital and undead corporate persons abuse
the lives and control the thoughts of homo faber. Ideas, once born,
become abortifacients against new conceptions.