projects
/
portage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
746f69f
)
Implement UserDict.__contains__() and __iter__().
author
Zac Medico
<zmedico@gentoo.org>
Thu, 19 Feb 2009 03:34:05 +0000
(
03:34
-0000)
committer
Zac Medico
<zmedico@gentoo.org>
Thu, 19 Feb 2009 03:34:05 +0000
(
03:34
-0000)
svn path=/main/trunk/; revision=12630
pym/portage/cache/mappings.py
patch
|
blob
|
history
diff --git
a/pym/portage/cache/mappings.py
b/pym/portage/cache/mappings.py
index a368050bacae73aad30fec0ea5cd9ba9dfa5ac78..a767e1bc5c80cef2e33b6aa0da35d0469ab32a8b 100644
(file)
--- a/
pym/portage/cache/mappings.py
+++ b/
pym/portage/cache/mappings.py
@@
-144,6
+144,12
@@
class UserDict(MutableMapping):
def __repr__(self):
return repr(self.data)
+ def __contains__(self, key):
+ return key in self.data
+
+ def __iter__(self):
+ return iter(self.data)
+
def __len__(self):
return len(self.data)