diff options
author | Guido van Rossum <guido@python.org> | 2002-04-13 14:03:38 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2002-04-13 14:03:38 (GMT) |
commit | f49562586f965ef8f670fcf8e7f89bf3df0a876e (patch) | |
tree | 1865287f476cfe0fe80823c346ae2920d80fd0d4 | |
parent | 0e871188e8cd9a4e41be7c734e250bfce2d92d56 (diff) | |
download | cpython-f49562586f965ef8f670fcf8e7f89bf3df0a876e.zip cpython-f49562586f965ef8f670fcf8e7f89bf3df0a876e.tar.gz cpython-f49562586f965ef8f670fcf8e7f89bf3df0a876e.tar.bz2 |
Add pop() to UserDict.
-rw-r--r-- | Lib/UserDict.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/UserDict.py b/Lib/UserDict.py index b78860f..91af83c 100644 --- a/Lib/UserDict.py +++ b/Lib/UserDict.py @@ -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): |