projects
/
portage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
46224ed
)
Simplify the implementation of config.__iter__ and also implement iterkeys().
author
Zac Medico
<zmedico@gentoo.org>
Thu, 21 Jun 2007 21:14:56 +0000
(21:14 -0000)
committer
Zac Medico
<zmedico@gentoo.org>
Thu, 21 Jun 2007 21:14:56 +0000
(21:14 -0000)
svn path=/main/trunk/; revision=6919
pym/portage/__init__.py
patch
|
blob
|
history
diff --git
a/pym/portage/__init__.py
b/pym/portage/__init__.py
index bf66dc4d2f008bb94414cc6d71b374ac89c24b1c..bfc6f08399411c4daa2e50e9d8d8090f6f38ccaa 100644
(file)
--- 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"