Skip to content

Instantly share code, notes, and snippets.

@NegatioN
Created February 14, 2020 04:13
Show Gist options
  • Save NegatioN/d576c95345f0cb21437eed8527ab79f7 to your computer and use it in GitHub Desktop.
Save NegatioN/d576c95345f0cb21437eed8527ab79f7 to your computer and use it in GitHub Desktop.
Dicts passed do not mutate.
def f(x, y, z):
x = "hello"
y, z = "swag", "master"
d = {'x': "bleh", 'y': "bleh", 'z': "bleh"}
f(**d)
print(d)
# {'x': 'bleh', 'y': 'bleh', 'z': 'bleh'}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment