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

Skip to content

Commit eff485e

Browse files
committed
Function signatures should use slash/star as needed
1 parent d7b683f commit eff485e

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
@@ -281,3 +281,13 @@ errors ("I made a mistake, therefore the docs must be wrong ..."). Typically,
281281
the documentation wasn't consulted until after the error was made. It is
282282
unfortunate, but typically no documentation edit would have saved the user from
283283
making false assumptions about the language ("I was surprised by ...").
284+
285+
Function signatures
286+
===================
287+
288+
These are the evolving guidelines for how to include function signatures in the docs:
289+
290+
- If a function accepts positional-only or keyword-only arguments, include the
291+
slash and the star in the signature as appropriate::
292+
293+
.. function:: some_function(pos1, pos2, /, pos_or_kwd, *, kwd1, kwd2):

0 commit comments

Comments
 (0)
0