From: Zac Medico Date: Sat, 7 Aug 2010 00:01:12 +0000 (-0700) Subject: Implement ExtendedAtomDict.__iter__(). X-Git-Tag: v2.2_rc68~372 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=29775f8cfeaff844ec4ed220dbf6da144fe37cf2;p=portage.git Implement ExtendedAtomDict.__iter__(). --- diff --git a/pym/portage/dep/__init__.py b/pym/portage/dep/__init__.py index 0ba96bdec..e0a0fffbd 100644 --- a/pym/portage/dep/__init__.py +++ b/pym/portage/dep/__init__.py @@ -785,6 +785,15 @@ class ExtendedAtomDict(portage.cache.mappings.MutableMapping): self._normal = {} self._value_class = value_class + def __iter__(self): + for k in self._normal: + yield k + for k in self._extended: + yield k + + if sys.hexversion >= 0x3000000: + keys = __iter__ + def setdefault(self, cp, default=None): if "*" in cp: return self._extended.setdefault(cp, default)