mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-04 08:56:19 +00:00
Most data classes now support hashing.
This commit is contained in:
@ -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