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

@ -75,6 +75,10 @@ class Invite(Hashable):
The channel the invite is for.
"""
__slots__ = [ 'max_age', 'code', 'server', 'revoked', 'created_at', 'uses',
'temporary', 'max_uses', 'xkcd', 'inviter', 'channel' ]
def __init__(self, **kwargs):
self.max_age = kwargs.get('max_age')
self.code = kwargs.get('code')