Implement ExtendedAtomDict.iteritems(), so that it doesn't invoke
authorZac Medico <zmedico@gentoo.org>
Mon, 16 Aug 2010 03:06:11 +0000 (20:06 -0700)
committerZac Medico <zmedico@gentoo.org>
Mon, 16 Aug 2010 03:06:11 +0000 (20:06 -0700)
the special __getitem__ behavior.

pym/portage/dep/__init__.py

index 4b6c2d0b0b212b8e8f1ed6bf738afe22d086e55f..678a6271d8f76d00d62a08d9c01d7a3047115e9a 100644 (file)
@@ -981,8 +981,15 @@ class ExtendedAtomDict(portage.cache.mappings.MutableMapping):
                for k in self._extended:
                        yield k
 
+       def iteritems(self):
+               for item in self._normal.items():
+                       yield item
+               for item in self._extended.items():
+                       yield item
+
        if sys.hexversion >= 0x3000000:
                keys = __iter__
+               items = iteritems
 
        def __len__(self):
                return len(self._normal) + len(self._extended)