From: Zac Medico Date: Thu, 19 Feb 2009 03:34:05 +0000 (-0000) Subject: Implement UserDict.__contains__() and __iter__(). X-Git-Tag: v2.2_rc24~176 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b91752f159ff292b4be59b11c9d1c4a7a16f58cf;p=portage.git Implement UserDict.__contains__() and __iter__(). svn path=/main/trunk/; revision=12630 --- 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)