Back to search

Positional, keyword, keyword-only, and positional-only arguments

Python lets you control how callers pass arguments so APIs can be both flexible and explicit.

Python Medium Theory

Positional, keyword, keyword-only, and positional-only arguments

Python lets you control how callers pass arguments so APIs can be both flexible and explicit.

  • Positional-only uses `/`
  • Keyword-only uses `*`
  • Signature design affects readability

Positional, keyword, keyword-only, and positional-only arguments