diff --git a/lib/iris/experimental/ugrid.py b/lib/iris/experimental/ugrid.py index f14d2f0a35..373f43623c 100644 --- a/lib/iris/experimental/ugrid.py +++ b/lib/iris/experimental/ugrid.py @@ -917,8 +917,8 @@ def normalise(location, axis): raise NotImplementedError(emsg) def __eq__(self, other): - # TBD - return NotImplemented + # TBD: this is a minimalist implementation and requires to be revisited + return id(self) == id(other) def __getstate__(self): return ( @@ -928,8 +928,10 @@ def __getstate__(self): ) def __ne__(self, other): - # TBD - return NotImplemented + result = self.__eq__(other) + if result is not NotImplemented: + result = not result + return result def __repr__(self): # TBD @@ -1304,8 +1306,8 @@ def __init__(self, node_x, node_y, edge_x=None, edge_y=None): self.edge_y = edge_y def __eq__(self, other): - # TBD - return NotImplemented + # TBD: this is a minimalist implementation and requires to be revisited + return id(self) == id(other) def __getstate__(self): return self._members @@ -1315,8 +1317,10 @@ def __iter__(self): yield item def __ne__(self, other): - # TBD - return NotImplemented + result = self.__eq__(other) + if result is not NotImplemented: + result = not result + return result def __repr__(self): args = [ @@ -1706,8 +1710,8 @@ def __init__(self, *connectivities): self.add(*connectivities) def __eq__(self, other): - # TBD - return NotImplemented + # TBD: this is a minimalist implementation and requires to be revisited + return id(self) == id(other) def __getstate__(self): return self._members @@ -1717,8 +1721,10 @@ def __iter__(self): yield item def __ne__(self, other): - # TBD - return NotImplemented + result = self.__eq__(other) + if result is not NotImplemented: + result = not result + return result def __repr__(self): args = [