mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-10-22 00:13:01 +00:00
Most data classes now support hashing.
This commit is contained in:
@@ -36,6 +36,8 @@ class Permissions(object):
|
||||
+-----------+------------------------------------------+
|
||||
| x != y | Checks if two permissions are not equal. |
|
||||
+-----------+------------------------------------------+
|
||||
| hash(x) | Return the permission's hash. |
|
||||
+-----------+------------------------------------------+
|
||||
|
||||
Attributes
|
||||
-----------
|
||||
@@ -57,6 +59,9 @@ class Permissions(object):
|
||||
def __ne__(self, other):
|
||||
return not self.__eq__(other)
|
||||
|
||||
def __hash__(self):
|
||||
return hash(self.value)
|
||||
|
||||
@classmethod
|
||||
def none(cls):
|
||||
"""A factory method that creates a :class:`Permission` with all
|
||||
|
Reference in New Issue
Block a user