diff --git a/src/__init__.py b/src/__init__.py index abc24f98d7e2a5c590e5d821cbe8a57151d3614c..b4a08714be4c5a0cad28eb3b84b1d4e084c2d5c1 100644 --- a/src/__init__.py +++ b/src/__init__.py @@ -95,9 +95,15 @@ class Record(object): def __repr__(self): return "%s(%s)" % ( self.__class__.__name__, - ", ".join("%s=%s" % (fld, getattr(self, fld)) + ", ".join("%s=%r" % (fld, getattr(self, fld)) for fld in self.__class__.fields)) + def __eq__(self, other): + return self.__getstate__() == other.__getstate__() + + def __ne__(self, other): + return not self.__eq__(other) +