The dictionary contains copy but NOT deep copy!
examples/functions/dict_is_not_a_deepcopy.py
def f(**kw): print(kw) print(hex(id(kw['z']))) kw['z']['a'] = 7 z = {'a': 1, 'b': 2} print(z) print(hex(id(z))) f(z = z) print(z)
{'a': 1, 'b': 2} 0x7f01fd163180 {'z': {'a': 1, 'b': 2}} 0x7f01fd163180 {'a': 7, 'b': 2}