summaryrefslogtreecommitdiffstats
path: root/Doc/glossary.rst
diff options
context:
space:
mode:
authorPablo Galindo <Pablogsal@gmail.com>2020-01-08 13:00:14 (GMT)
committerMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2020-01-08 13:00:14 (GMT)
commit9a669d58e8cb586fba38c84d5b631cd8a95d0c0c (patch)
tree67ab8d62833954426b0e771534732dc11c209f29 /Doc/glossary.rst
parent998c54948a29cf5bd8bfa49f973f1ce5855004a0 (diff)
downloadcpython-9a669d58e8cb586fba38c84d5b631cd8a95d0c0c.zip
cpython-9a669d58e8cb586fba38c84d5b631cd8a95d0c0c.tar.gz
cpython-9a669d58e8cb586fba38c84d5b631cd8a95d0c0c.tar.bz2
bpo-39233: Update positional-only section in the glossary (GH-17874)
https://bugs.python.org/issue39233
Diffstat (limited to 'Doc/glossary.rst')
-rw-r--r--Doc/glossary.rst8
1 files changed, 5 insertions, 3 deletions
diff --git a/Doc/glossary.rst b/Doc/glossary.rst
index 9ce0357..6189cb0 100644
--- a/Doc/glossary.rst
+++ b/Doc/glossary.rst
@@ -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: