[Python-3000-checkins] r60591 - python/branches/py3k/Lib/_abcoll.py

raymond.hettinger python-3000-checkins at python.org
Tue Feb 5 13:10:30 CET 2008


Author: raymond.hettinger
Date: Tue Feb  5 13:10:29 2008
New Revision: 60591

Modified:
   python/branches/py3k/Lib/_abcoll.py
Log:
Fix-up mapping equality tests to include both keys and values

Modified: python/branches/py3k/Lib/_abcoll.py
==============================================================================
--- python/branches/py3k/Lib/_abcoll.py	(original)
+++ python/branches/py3k/Lib/_abcoll.py	Tue Feb  5 13:10:29 2008
@@ -379,10 +379,10 @@
         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):
 


More information about the Python-3000-checkins mailing list