>>> c['z']=10
>>> c['w']=20
>>> a
{'x': 1, 'z': 10, 'w': 20}
>>> b
{'y': 2, 'z': 5}
>>> c
ChainMap({'x': 1, 'z': 10, 'w': 20}, {'y': 2, 'z': 5})
>>> del c['x']
>>> del c['y']
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/collections/__init__.py", line 970, in __delitem__
del self.maps[0][key]
KeyError: 'y'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/collections/__init__.py", line 972, in __delitem__
raise KeyError('Key not found in the first mapping: {!r}'.format(key))
KeyError: "Key not found in the first mapping: 'y'"