Add useful repr to all data classes.

This commit is contained in:
Rapptz
2016-12-30 04:34:42 -05:00
parent ec6c7f8b34
commit dceba9d962
12 changed files with 48 additions and 1 deletions

View File

@ -95,6 +95,9 @@ class Invite(Hashable):
def __str__(self):
return self.url
def __repr__(self):
return '<Invite code={0.code!r}>'.format(self)
@property
def id(self):
"""Returns the proper code portion of the invite."""