The dictionary contains copy
def f(**kw):
print(kw)
kw['a'] = 7
print(kw)
z = 23
f(a=10, b=12)
f(a=z, y=99, z=1)
print(z)
Output:
{'a': 10, 'b': 12}
{'a': 7, 'b': 12}
{'a': 23, 'y': 99, 'z': 1}
{'a': 7, 'y': 99, 'z': 1}
23
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
def f(**kw):
print(kw)
kw['a'] = 7
print(kw)
z = 23
f(a=10, b=12)
f(a=z, y=99, z=1)
print(z)
Output:
{'a': 10, 'b': 12}
{'a': 7, 'b': 12}
{'a': 23, 'y': 99, 'z': 1}
{'a': 7, 'y': 99, 'z': 1}
23