]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-39233: Update positional-only section in the glossary (GH-17874)
authorPablo Galindo <Pablogsal@gmail.com>
Wed, 8 Jan 2020 13:00:14 +0000 (13:00 +0000)
committerMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 8 Jan 2020 13:00:14 +0000 (05:00 -0800)
https://bugs.python.org/issue39233

Doc/glossary.rst

index 9ce0357f1cb42415e9241b966a21ae0dfe76e8dc..6189cb045049c2a20ee59fcf4aa27bfa60b52f17 100644 (file)
@@ -824,9 +824,11 @@ Glossary
       .. _positional-only_parameter:
 
       * :dfn:`positional-only`: specifies an argument that can be supplied only
-        by position.  Python has no syntax for defining positional-only
-        parameters.  However, some built-in functions have positional-only
-        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::
+
+           def func(posonly1, posonly2, /, positional_or_keyword): ...
 
       .. _keyword-only_parameter: