From b91752f159ff292b4be59b11c9d1c4a7a16f58cf Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 19 Feb 2009 03:34:05 +0000 Subject: [PATCH] Implement UserDict.__contains__() and __iter__(). svn path=/main/trunk/; revision=12630 --- pym/portage/cache/mappings.py | 6 ++++++ 1 file changed, 6 insertions(+) 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) -- 2.26.2