1.1 --- a/lib/__builtins__/dict.py Sun Jan 15 18:10:54 2017 +0100
1.2 +++ b/lib/__builtins__/dict.py Sun Jan 15 18:44:06 2017 +0100
1.3 @@ -151,12 +151,17 @@
1.4
1.5 def __delitem__(self, key, value): pass
1.6
1.7 - def __getitem__(self, key, default=MISSING):
1.8 + def __getitem__(self, key):
1.9 +
1.10 + "Return the value associated with 'key' from the dictionary."
1.11 +
1.12 + return self.get(key, self.MISSING)
1.13 +
1.14 + def get(self, key, default=None):
1.15
1.16 """
1.17 Return the value stored for 'key'. If 'key' does not have an entry in
1.18 - the dictionary, a KeyError will be raised unless 'default' is specified.
1.19 - In which case, 'default' will be returned instead.
1.20 + the dictionary, 'default' will be returned instead.
1.21 """
1.22
1.23 # Find an index identifying the bucket involved.
1.24 @@ -181,6 +186,7 @@
1.25 return self.buckets[index][i][1]
1.26
1.27 def clear(self): pass
1.28 +
1.29 def has_key(self): pass
1.30
1.31 def keys(self):
1.32 @@ -210,7 +216,6 @@
1.33 l += bucket
1.34 return l
1.35
1.36 - def get(self, key): pass
1.37 def setdefault(self, key, value): pass
1.38 def update(self, other): pass
1.39