diff
diff
defines a difference protocol. Watch:
>>> class LonelyObject:
... def __diff__(self, other):
... return f"{self} is not like {other}"
...
... def __repr__(self):
... return "<LonelyObject>"
>>> from diff import diff
>>> diff(LonelyObject(), 12).explain()
'<LonelyObject> is not like 12'