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

Skip to content

Commit db8f234

Browse files
committed
explain more about the reason to use slash/star
1 parent 672ceb9 commit db8f234

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
@@ -295,9 +295,14 @@ making false assumptions about the language ("I was surprised by ...").
295295
Function signatures
296296
===================
297297

298-
These are the evolving guidelines for how to include function signatures in the docs:
298+
These are the evolving guidelines for how to include function signatures in the
299+
reference guide. As outlined in :ref:`diataxis`, reference material should
300+
prioritize precision and completeness.
299301

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

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

0 commit comments

Comments
 (0)
0