mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Add pop() to UserDict.
This commit is contained in:
parent
0e871188e8
commit
f49562586f
1 changed files with 2 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue