MemotivaFunctions and arguments

What are positional-only and keyword-only parameters?

Functions and arguments

Audio flashcard · 0:17

Nortren·

What are positional-only and keyword-only parameters?

0:17

Positional-only parameters cannot be passed by name. They are declared by placing a forward slash in the parameter list; everything before the slash is positional-only. Keyword-only parameters must be passed by name. They are declared after a star in the parameter list. Both features improve API clarity.
peps.python.org