diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-06-21 21:14:56 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-06-21 21:14:56 +0000 |
commit | ac67750451afe6c33d75553906839b28c9077230 (patch) | |
tree | 2b4b825a98c110c5106b8c8bb67c1817d8059727 | |
parent | 46224ed3874b469c38ea5e973b1e5faf5483b376 (diff) | |
download | portage-ac67750451afe6c33d75553906839b28c9077230.tar.gz portage-ac67750451afe6c33d75553906839b28c9077230.tar.bz2 portage-ac67750451afe6c33d75553906839b28c9077230.zip |
Simplify the implementation of config.__iter__ and also implement iterkeys().
svn path=/main/trunk/; revision=6919
-rw-r--r-- | pym/portage/__init__.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index bf66dc4d2..bfc6f0839 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -2230,11 +2230,11 @@ class config(object): def __iter__(self): keys = set() for d in self.lookuplist: - for k in d: - if k in keys: - continue - keys.add(k) - yield k + keys.update(d) + return iter(keys) + + def iterkeys(self): + return iter(self) def __setitem__(self,mykey,myvalue): "set a value; will be thrown away at reset() time" |