[Python-checkins] bpo-39233: Update positional-only section in the glossary (GH-17874)

Miss Islington (bot) webhook-mailer at python.org
Sun Jan 12 06:03:20 EST 2020


https://github.com/python/cpython/commit/a240f0545653d961c67c1eb1597cb70b67f4e5f1
commit: a240f0545653d961c67c1eb1597cb70b67f4e5f1
branch: 3.8
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2020-01-12T03:03:15-08:00
summary:

bpo-39233: Update positional-only section in the glossary (GH-17874)


https://bugs.python.org/issue39233
(cherry picked from commit 9a669d58e8cb586fba38c84d5b631cd8a95d0c0c)

Co-authored-by: Pablo Galindo <Pablogsal at gmail.com>

files:
M Doc/glossary.rst

diff --git a/Doc/glossary.rst b/Doc/glossary.rst
index 9ce0357f1cb42..6189cb045049c 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:
 



More information about the Python-checkins mailing list