From b47825b8dabb4f567903fd27b6cc5e5ddf2f54b1 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Wed, 11 Mar 2009 05:45:06 +0000 Subject: [PATCH] Implement UserDict.__contains__() and __iter__(). (trunk r12630) svn path=/main/branches/2.1.6/; revision=12903 --- 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