Skip to content

Instantly share code, notes, and snippets.

@xevix
Created December 9, 2016 06:47
Show Gist options
  • Save xevix/fb9d0a707790322f7e3da638c20bed06 to your computer and use it in GitHub Desktop.
Save xevix/fb9d0a707790322f7e3da638c20bed06 to your computer and use it in GitHub Desktop.
def foo(bob, **kwargs):
pass
kwargs = {'bob': 'first param is also bob, when splatted, they clash...'}
foo('bar', **kwargs) # KABOOM!
# Traceback (most recent call last):
# File "<stdin>", line 1, in <module>
# TypeError: foo() got multiple values for keyword argument 'bob'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment