diff options
author | Zac Medico <zmedico@gentoo.org> | 2009-03-11 05:45:06 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2009-03-11 05:45:06 +0000 |
commit | b47825b8dabb4f567903fd27b6cc5e5ddf2f54b1 (patch) | |
tree | a9a5aadcdf241d246e6539bc81dd2c5162a81e2a | |
parent | 306729b2f4fe5add671b7780c9eb4d6977e4698f (diff) | |
download | portage-b47825b8dabb4f567903fd27b6cc5e5ddf2f54b1.tar.gz portage-b47825b8dabb4f567903fd27b6cc5e5ddf2f54b1.tar.bz2 portage-b47825b8dabb4f567903fd27b6cc5e5ddf2f54b1.zip |
Implement UserDict.__contains__() and __iter__(). (trunk r12630)
svn path=/main/branches/2.1.6/; revision=12903
-rw-r--r-- | pym/portage/cache/mappings.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pym/portage/cache/mappings.py b/pym/portage/cache/mappings.py index a368050ba..a767e1bc5 100644 --- 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) |