Skip to content

Commit 9efe4f6

Browse files
committed
Review changes.
1 parent 96792e3 commit 9efe4f6

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/iris/cube.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -955,17 +955,17 @@ def __setstate__(self, state):
955955
self.locals, self.globals = state
956956

957957
#
958-
# Support simple comparison, even when contents are arrays.
958+
# Support comparison -- required because default operation only compares a single
959+
# value at each key.
959960
#
960961
def __eq__(self, other):
961-
# For equality, require both globals + locals to match
962+
# For equality, require both globals + locals to match exactly.
963+
# NOTE: array content works correctly, since 'locals' and 'globals' are always
964+
# iris.common.mixin.LimitedAttributeDict, which gets this right.
962965
other = CubeAttrsDict(other)
963966
result = self.locals == other.locals and self.globals == other.globals
964967
return result
965968

966-
def __ne__(self, other):
967-
return not self == other
968-
969969
#
970970
# Provide a copy method, as for 'dict', but *not* provided by MutableMapping
971971
#

0 commit comments

Comments
 (0)