A positional-only parameter lets a library change its internal argument name without breaking keyword callers. The slash marks the boundary.
Worked example
def divide(a, b, /):
return a / b
print(divide(9, 3))Result
3.0Implementation notes
A positional-only name can still appear as a key in a separate dictionary argument. The restriction describes how the function is called, not which strings are valid data.
Try it yourself
Call the function once by position and once using the parameter name.
Open the Python example →Editorial date October 7, 2025 · Published December 6, 2026