8000 explain more about the reason to use slash/star · python/devguide@750ceb2 · GitHub
[go: up one dir, main page]

Skip to content

Commit 750ceb2

Browse files
committed
explain more about the reason to use slash/star
1 parent eff485e commit 750ceb2

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

documentation/style-guide.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,9 +285,14 @@ making false assumptions about the language ("I was surprised by ...").
285285
Function signatures
286286
===================
287287

288-
These are the evolving guidelines for how to include function signatures in the docs:
288+
These are the evolving guidelines for how to include function signatures in the
289+
reference guide. As outlined in :ref:`diataxis`, reference material should
290+
prioritize precision and completeness.
289291

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

293295
.. function:: some_function(pos1, pos2, /, pos_or_kwd, *, kwd1, kwd2):
296+
297+
Although the syntax is terse, it is precise about the allowable ways to call
298+
the function and is taken from Python itself.

0 commit comments

Comments
 (0)
0