summaryrefslogtreecommitdiffstats
path: root/Lib/UserDict.py
diff options
context:
space:
mode:
authorWalter Dörwald <walter@livinglogic.de>2004-05-27 09:41:04 (GMT)
committerWalter Dörwald <walter@livinglogic.de>2004-05-27 09:41:04 (GMT)
commitc139909611162e995321c09a32c4e42433e2655e (patch)
tree303eddee3d060674095d1fe91d5d8117e1690ccb /Lib/UserDict.py
parent08678a1055b273ad7394f70ebfa17744ca1a6708 (diff)
downloadcpython-c139909611162e995321c09a32c4e42433e2655e.zip
cpython-c139909611162e995321c09a32c4e42433e2655e.tar.gz
cpython-c139909611162e995321c09a32c4e42433e2655e.tar.bz2
The default argument in dict.setdefault() defaults to None.
Add this default to UserDict.DictMixin.setdefault() too.
Diffstat (limited to 'Lib/UserDict.py')
-rw-r--r--Lib/UserDict.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/UserDict.py b/Lib/UserDict.py
index 87cc6a3..703f118 100644
--- a/Lib/UserDict.py
+++ b/Lib/UserDict.py
@@ -113,7 +113,7 @@ class DictMixin:
def clear(self):
for key in self.keys():
del self[key]
- def setdefault(self, key, default):
+ def setdefault(self, key, default=None):
try:
return self[key]
except KeyError: