Add __slots__ where appropriate to data classes.

This commit is contained in:
Rapptz
2015-12-19 06:18:12 -05:00
parent 4fa5b50d2b
commit f1f0e169e4
10 changed files with 33 additions and 12 deletions

View File

@ -24,7 +24,7 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
"""
class Colour(object):
class Colour:
"""Represents a Discord role colour. This class is similar
to an (red, green, blue) tuple.
@ -50,6 +50,8 @@ class Colour(object):
The raw integer colour value.
"""
__slots__ = [ 'value' ]
def __init__(self, value):
self.value = value