summaryrefslogtreecommitdiffstats
path: root/Lib/dos-8x3/userdict.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/dos-8x3/userdict.py')
-rwxr-xr-xLib/dos-8x3/userdict.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/dos-8x3/userdict.py b/Lib/dos-8x3/userdict.py
index 3c48415..9b6e73b 100755
--- a/Lib/dos-8x3/userdict.py
+++ b/Lib/dos-8x3/userdict.py
@@ -34,3 +34,7 @@ class UserDict:
self.data[k] = v
def get(self, key, failobj=None):
return self.data.get(key, failobj)
+ def setdefault(self, key, failobj=None):
+ if not self.data.has_key(key):
+ self.data[key] = failobj
+ return self.data[key]