8000 Function signatures should use slash/star as needed by nedbat · Pull Request #1344 · python/devguide · GitHub
[go: up one dir, main page]

Skip to content

Function signatures should use slash/star as needed #1344

8000
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 2 commits into from
Jul 12, 2024
Merged
Changes from 1 commit
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
Next Next commit
Function signatures should use slash/star as needed
  • Loading branch information
nedbat committed Jul 11, 2024
commit 672ceb9d510a7fb322eb4384654a961c9de1fd6c
10 changes: 10 additions & 0 deletions documentation/style-guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -291,3 +291,13 @@ errors ("I made a mistake, therefore the docs must be wrong ..."). Typically,
the documentation wasn't consulted until after the error was made. It is
unfortunate, but typically no documentation edit would have saved the user from
making false assumptions about the language ("I was surprised by ...").

Function signatures
===================

These are the evolving guidelines for how to include function signatures in the docs:

- If a function accepts positional-only or keyword-only arguments, include the
slash and the star in the signature as appropriate::

.. function:: some_function(pos1, pos2, /, pos_or_kwd, *, kwd1, kwd2):
0