From f1f0e169e425ac9c849561788281e27bd8bb0acd Mon Sep 17 00:00:00 2001 From: Rapptz Date: Sat, 19 Dec 2015 06:18:12 -0500 Subject: Add __slots__ where appropriate to data classes. --- discord/role.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'discord/role.py') diff --git a/discord/role.py b/discord/role.py index a78a4af7..7b4c1d5e 100644 --- a/discord/role.py +++ b/discord/role.py @@ -53,8 +53,8 @@ class Role(Hashable): The name of the role. permissions : :class:`Permissions` Represents the role's permissions. - color : :class:`Colour` - Represents the role colour. + colour : :class:`Colour` + Represents the role colour. An alias exists under ``color``. hoist : bool Indicates if the role will be displayed separately from other members. position : int @@ -64,6 +64,9 @@ class Role(Hashable): integrations such as Twitch. """ + __slots__ = ['id', 'name', 'permissions', 'color', 'colour', 'position', + 'managed', '_is_everyone', 'hoist' ] + def __init__(self, **kwargs): self._is_everyone = kwargs.get('everyone', False) self.update(**kwargs) -- cgit v1.2.3