1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-22 19:14:20 +00:00

🔧 Allow equality checks between casings

This commit is contained in:
Steffo 2021-04-19 14:46:46 +02:00
parent 5a29f19143
commit 292ea30298
Signed by: steffo
GPG key ID: 6965406171929D01

View file

@ -39,3 +39,6 @@ class Casing(metaclass=abc.ABCMeta):
:return: A :class:`int` value that uniquely identifies the object in this Python interpreter process.
"""
raise NotImplementedError()
def __eq__(self, other) -> bool:
return self.__class__ is other.__class__ and hash(self) == hash(other)