The usual

This commit is contained in:
Guido van Rossum 1997-11-26 15:44:34 +00:00
parent 330c660f66
commit 0b23348aa9
15 changed files with 782 additions and 124 deletions

View file

@ -26,3 +26,8 @@ class UserDict:
else:
for k, v in other.items():
self.data[k] = v
def get(self, key, failobj=None):
if self.data.has_key(key):
return self.data[key]
else:
return failobj