Commit 2c7cab20 authored by Tiago Peixoto's avatar Tiago Peixoto

Add PropertyDict.pop() method

parent 29074954
......@@ -1379,6 +1379,14 @@ class PropertyDict(object):
except KeyError:
return default
def pop(self, key, default=None):
x = self[key]
del self[key]
return x
except KeyError:
return default
def __setitem__(self, key, val):
k = (self.t, key)
if self.t == "g" and not isinstance(val, PropertyMap) and k in
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment