From 58b49123efc3a698aeb80d185e918beb66e547d2 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 26 Nov 2007 17:31:40 +0000 Subject: [PATCH] Implement config.pop(). (trunk r8688) svn path=/main/branches/2.1.2/; revision=8689 --- pym/portage.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pym/portage.py b/pym/portage.py index e62355a9a..b0325feb8 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -2420,6 +2420,12 @@ class config: return d[k] return x + def pop(self, k, x=None): + v = x + for d in reversed(self.lookuplist): + v = d.pop(k, v) + return v + def has_key(self,mykey): return mykey in self -- 2.26.2