projects
/
portage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c96c3af
)
Use dict.__iter__ instead of keys(), since it behaves identically in python
author
Zac Medico
<zmedico@gentoo.org>
Thu, 24 Sep 2009 20:43:14 +0000
(20:43 -0000)
committer
Zac Medico
<zmedico@gentoo.org>
Thu, 24 Sep 2009 20:43:14 +0000
(20:43 -0000)
2 and 3.
svn path=/main/trunk/; revision=14412
pym/portage/cache/mappings.py
patch
|
blob
|
history
diff --git
a/pym/portage/cache/mappings.py
b/pym/portage/cache/mappings.py
index bd9f082b9ab43878f41cadd41a69c64080c898d5..ed6e19ddd9269c9480fcebf809eff13e3f53be72 100644
(file)
--- a/
pym/portage/cache/mappings.py
+++ b/
pym/portage/cache/mappings.py
@@
-67,7
+67,7
@@
class Mapping(object):
return repr(dict(self.items()))
def __len__(self):
- return len(list(self
.keys()
))
+ return len(list(self))
if sys.hexversion >= 0x3000000:
items = iteritems
@@
-80,7
+80,7
@@
class MutableMapping(Mapping):
"""
def clear(self):
- for key in list(self
.keys()
):
+ for key in list(self):
del self[key]
def setdefault(self, key, default=None):