mirror of
https://github.com/Rapptz/discord.py.git
synced 2026-11-20 13:29:03 +00:00
Most data classes now support hashing.
This commit is contained in:
1 parent
613214f197
commit
51d91c2a82
8 files changed
+38
-9
No files matched your search
@@ -32,3 +32,7 @@ class EqualityComparable:
|
||||
if isinstance(other, self.__class__):
|
||||
return other.id != self.id
|
||||
return True
|
||||
|
||||
class Hashable(EqualityComparable):
|
||||
def __hash__(self):
|
||||
return hash(self.id)
|
||||
Reference in new issue
Block a user