8000 Function signatures should use slash/star as needed · python/devguide@672ceb9 · GitHub
[go: up one dir, main page]

Skip to content

Commit 672ceb9

Browse files
committed
Function signatures should use slash/star as needed
1 parent efa3c68 commit 672ceb9

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

documentation/style-guide.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,3 +291,13 @@ errors ("I made a mistake, therefore the docs must be wrong ..."). Typically,
291291
the documentation wasn't consulted until after the error was made. It is
292292
unfortunate, but typically no documentation edit would have saved the user from
293293
making false assumptions about the language ("I was surprised by ...").
294+
295+
Function signatures
296+
===================
297+
298+
These are the evolving guidelines for how to include function signatures in the docs:
299+
300+
- If a function accepts positional-only or keyword-only arguments, include the
301+
slash and the star in the signature as appropriate::
302+
303+
.. function:: some_function(pos1, pos2, /, pos_or_kwd, *, kwd1, kwd2):

0 commit comments

Comments
 (0)
0