From: Zac Medico Date: Wed, 11 Mar 2009 05:45:06 +0000 (-0000) Subject: Implement UserDict.__contains__() and __iter__(). (trunk r12630) X-Git-Tag: v2.1.6.8~174 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b47825b8dabb4f567903fd27b6cc5e5ddf2f54b1;p=portage.git Implement UserDict.__contains__() and __iter__(). (trunk r12630) svn path=/main/branches/2.1.6/; revision=12903 --- 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)