We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 998c549 commit 9a669d5Copy full SHA for 9a669d5
Doc/glossary.rst
@@ -824,9 +824,11 @@ Glossary
824
.. _positional-only_parameter:
825
826
* :dfn:`positional-only`: specifies an argument that can be supplied only
827
- by position. Python has no syntax for defining positional-only
828
- parameters. However, some built-in functions have positional-only
829
- parameters (e.g. :func:`abs`).
+ by position. Positional-only parameters can be defined by including a
+ ``/`` character in the parameter list of the function definition after
+ them, for example *posonly1* and *posonly2* in the following::
830
+
831
+ def func(posonly1, posonly2, /, positional_or_keyword): ...
832
833
.. _keyword-only_parameter:
834
0 commit comments