Add pop() to UserDict.
This commit is contained in:
parent
0e871188e8
commit
f49562586f
|
@ -50,6 +50,8 @@ class UserDict:
|
|||
if not self.has_key(key):
|
||||
self[key] = failobj
|
||||
return self[key]
|
||||
def pop(self, key):
|
||||
return self.data.pop(key)
|
||||
def popitem(self):
|
||||
return self.data.popitem()
|
||||
def __contains__(self, key):
|
||||
|
|
Loading…
Reference in New Issue