Skip to content

Add a note with adoption guidance on positional-only parameters #38

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 16, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions spec/API_specification/function_and_method_signatures.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ Function signatures in this standard adhere to the following:
_Rationale: existing libraries have incompatible conventions, and using names
of positional parameters is not normal/recommended practice._

.. note::

Positional-only parameters are only available in Python >= 3.8. Libraries
still supporting 3.7 or 3.6 may consider making the API standard-compliant
namespace >= 3.8. Alternatively, they can add guidance to their users in the
documentation to use the functions as if they were positional-only.

2. Optional parameters must be
[keyword-only](https://www.python.org/dev/peps/pep-3102/) arguments.

Expand Down