diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-08-06 17:01:12 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-08-06 17:01:12 -0700 |
commit | 29775f8cfeaff844ec4ed220dbf6da144fe37cf2 (patch) | |
tree | defabff38475d1b5c1134460b59be168e0ff5270 /pym | |
parent | Fix _select_pkg_highest_available_imp to reject installed packages (diff) | |
download | portage-multirepo-29775f8cfeaff844ec4ed220dbf6da144fe37cf2.tar.gz portage-multirepo-29775f8cfeaff844ec4ed220dbf6da144fe37cf2.tar.bz2 portage-multirepo-29775f8cfeaff844ec4ed220dbf6da144fe37cf2.zip |
Implement ExtendedAtomDict.__iter__().
Diffstat (limited to 'pym')
-rw-r--r-- | pym/portage/dep/__init__.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/pym/portage/dep/__init__.py b/pym/portage/dep/__init__.py index 0ba96bde..e0a0fffb 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) |