Kaydet (Commit) b0d28b4c authored tarafından Raymond Hettinger's avatar Raymond Hettinger

Fix-up mapping equality tests to include both keys and values

üst 48b8b665
......@@ -379,10 +379,10 @@ class Mapping(metaclass=ABCMeta):
return ValuesView(self)
def __eq__(self, other):
return set(self) == set(other)
return dict(self.items()) == dict(other.items())
def __ne__(self, other):
return set(self) != set(other)
return dict(self.items()) != dict(other.items())
class MappingView(metaclass=ABCMeta):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment