From ad0ccd212d38b03afc6df97655a86f6a008a0001 Mon Sep 17 00:00:00 2001 From: Pablo Galindo Date: Mon, 6 Jan 2020 19:52:34 +0000 Subject: [PATCH] bpo-39233: Update positional-only section in the glossary --- Doc/glossary.rst | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Doc/glossary.rst b/Doc/glossary.rst index 9ce0357f1cb424..6189cb045049c2 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: