All data classes now support !=, == and str(obj).

This commit is contained in:
Rapptz
2015-12-13 22:53:48 -05:00
parent ab46afee1d
commit 9137d92f67
8 changed files with 149 additions and 17 deletions

View File

@ -64,9 +64,7 @@ class User(object):
return isinstance(other, User) and other.id == self.id
def __ne__(self, other):
if isinstance(other, User):
return other.id != self.id
return False
return not self.__eq__(other)
@property
def avatar_url(self):