Skip to content

Instantly share code, notes, and snippets.

@BetterProgramming
Created November 20, 2020 17:45
Show Gist options
  • Save BetterProgramming/8cf12d32be1014f1c6a28e91e49f92d9 to your computer and use it in GitHub Desktop.
Save BetterProgramming/8cf12d32be1014f1c6a28e91e49f92d9 to your computer and use it in GitHub Desktop.
>>> def f(*, a, b):
... print(a, b)
...
>>> f(1, 2)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: f() takes 0 positional
arguments but 2 were given
>>> f(a=1, b=2)
1 2
>>>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment