Merge "Add __ne__ built-in function"

This commit is contained in:
Jenkins
2016-09-07 18:39:50 +00:00
committed by Gerrit Code Review

View File

@@ -42,6 +42,9 @@ class BaseDataModel(object):
return self.to_dict() == other.to_dict() return self.to_dict() == other.to_dict()
return False return False
def __ne__(self, other):
return not self.__eq__(other)
@classmethod @classmethod
def from_dict(cls, dict): def from_dict(cls, dict):
return cls(**dict) return cls(**dict)