From: Zac Medico Date: Mon, 26 Nov 2007 17:31:40 +0000 (-0000) Subject: Implement config.pop(). (trunk r8688) X-Git-Tag: v2.1.4~200 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=58b49123efc3a698aeb80d185e918beb66e547d2;p=portage.git Implement config.pop(). (trunk r8688) svn path=/main/branches/2.1.2/; revision=8689 --- 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