Add pop() to UserDict.

This commit is contained in:
Guido van Rossum 2002-04-13 14:03:38 +00:00
parent 0e871188e8
commit f49562586f
1 changed files with 2 additions and 0 deletions

View File

@ -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):