Give penguin class a __repr__ method

This commit is contained in:
Ben 2019-04-11 00:56:27 +01:00
parent 3e576ba602
commit d292407dc7

View File

@ -34,3 +34,8 @@ class Penguin(Spheniscidae):
async def add_inbox(self, postcard): async def add_inbox(self, postcard):
pass pass
def __repr__(self):
if self.data is not None:
return '<Penguin ID=\'{}\' Username=\'{}\'>'.format(self.data.ID, self.data.Username)
return super().__repr__()