File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff 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 #
You can’t perform that action at this time.
0 commit comments