This commit is contained in:
Kovid Goyal 2015-02-05 10:35:41 +05:30
parent b86a502fbb
commit c9f6eb7b17

View File

@ -76,7 +76,13 @@ class TextStyle(object):
getattr(self, x) for x in self.ALL_PROPS)) getattr(self, x) for x in self.ALL_PROPS))
def __eq__(self, other): def __eq__(self, other):
return hash(self) == hash(other) for x in self.ALL_PROPS:
if getattr(self, x) != getattr(other, x, None):
return False
return True
def __ne__(self, other):
return not self == other
class LineBreak(object): class LineBreak(object):