Skip to content

Instantly share code, notes, and snippets.

@BetterProgramming
Created November 20, 2020 17:45
>>> 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