Implement config.pop().
authorZac Medico <zmedico@gentoo.org>
Mon, 26 Nov 2007 17:28:51 +0000 (17:28 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 26 Nov 2007 17:28:51 +0000 (17:28 -0000)
svn path=/main/trunk/; revision=8688

pym/portage/__init__.py

index 04b73b1b8e49ea79fd0de6c1715ac9bc31b1551b..2fecfef3878ba4991b8f681c97f2099fa9075f99 100644 (file)
@@ -2470,6 +2470,12 @@ class config(object):
                                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