diff --git a/gwinc/struct.py b/gwinc/struct.py index 56a16142f30c5939c62da117e6a1d74ee7d72303..25c82508af8cfd35764329900f1429348e900642 100644 --- a/gwinc/struct.py +++ b/gwinc/struct.py @@ -215,6 +215,9 @@ class Struct(object): diffs.append((k, v, ov)) return diffs + def __eq__(self, other): + """True if structs have all equal values""" + return not bool(self.diff(other)) def to_txt(self, path=None, fmt='0.6e', delimiter=': ', end=''): """Return text represenation of Struct, one element per line.