Most data classes now support hashing.

This commit is contained in:
Rapptz
2015-12-17 00:30:08 -05:00
parent 613214f197
commit 51d91c2a82
8 changed files with 38 additions and 9 deletions

View File

@ -26,9 +26,9 @@ DEALINGS IN THE SOFTWARE.
from .permissions import Permissions
from .colour import Colour
from .mixins import EqualityComparable
from .mixins import Hashable
class Role(EqualityComparable):
class Role(Hashable):
"""Represents a Discord role in a :class:`Server`.
Supported Operations:
@ -40,6 +40,8 @@ class Role(EqualityComparable):
+-----------+------------------------------------+
| x != y | Checks if two roles are not equal. |
+-----------+------------------------------------+
| hash(x) | Return the role's hash. |
+-----------+------------------------------------+
| str(x) | Returns the role's name. |
+-----------+------------------------------------+