def __eq__(self, other):
        """Model is equal if and only if linear, adj, offset and vartype are all equal."""

        try:
            if self.vartype is not other.vartype:
                return False

            if self.offset != other.offset:
                return False

            if self.linear != other.linear:
                return False

            return self.adj == other.adj
        except AttributeError:
            return False
def __eq__ ( self , other ) : try : if self . vartype is not other . vartype : return False if self . offset != other . offset : return False if self . linear != other . linear : return False return self . adj == other . adj except AttributeError : return False
Model is equal if and only if linear, adj, offset and vartype are all equal.