From: Guido van Rossum Date: Sat, 13 Apr 2002 14:03:38 +0000 (+0000) Subject: Add pop() to UserDict. X-Git-Tag: v2.3c1~5982 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f49562586f965ef8f670fcf8e7f89bf3df0a876e;p=python Add pop() to UserDict. --- diff --git a/Lib/UserDict.py b/Lib/UserDict.py index b78860fc9e..91af83c081 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):