summaryrefslogtreecommitdiffstats
path: root/pym/portage/cache/mappings.py
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-09-24 20:43:14 +0000
committerZac Medico <zmedico@gentoo.org>2009-09-24 20:43:14 +0000
commitafc3c3624c56dafdb263351715f982915d16884f (patch)
treea55823bc6a210228faf3a9ad67bbe803fe203aa9 /pym/portage/cache/mappings.py
parentc96c3af624212762c8cda3288da2d4caa40079d0 (diff)
downloadportage-afc3c3624c56dafdb263351715f982915d16884f.tar.gz
portage-afc3c3624c56dafdb263351715f982915d16884f.tar.bz2
portage-afc3c3624c56dafdb263351715f982915d16884f.zip
Use dict.__iter__ instead of keys(), since it behaves identically in python
2 and 3. svn path=/main/trunk/; revision=14412
Diffstat (limited to 'pym/portage/cache/mappings.py')
-rw-r--r--pym/portage/cache/mappings.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pym/portage/cache/mappings.py b/pym/portage/cache/mappings.py
index bd9f082b9..ed6e19ddd 100644
--- 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):