diff options
author | Pablo Galindo <Pablogsal@gmail.com> | 2019-05-28 23:45:32 (GMT) |
---|---|---|
committer | Carol Willing <carolcode@willingconsulting.com> | 2019-05-28 23:45:32 (GMT) |
commit | b76302ddd0896cb39ce69909349b53db6e7776e2 (patch) | |
tree | 5f9a80489decdb07f40e97cf618d62f0ce5b4930 /Doc/library | |
parent | 77f0ed7a42606d03ebfe48ab152caf0d796d6540 (diff) | |
download | cpython-b76302ddd0896cb39ce69909349b53db6e7776e2.zip cpython-b76302ddd0896cb39ce69909349b53db6e7776e2.tar.gz cpython-b76302ddd0896cb39ce69909349b53db6e7776e2.tar.bz2 |
bpo-36540: Documentation for PEP570 - Python positional only arguments (#13202)
* bpo-36540: Documentation for PEP570 - Python positional only arguments
* fixup! bpo-36540: Documentation for PEP570 - Python positional only arguments
* Update reference for compound statements
* Apply suggestions from Carol
Co-Authored-By: Carol Willing <carolcode@willingconsulting.com>
* Update Doc/tutorial/controlflow.rst
Co-Authored-By: Carol Willing <carolcode@willingconsulting.com>
* Add extra bullet point and minor edits
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/inspect.rst | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/Doc/library/inspect.rst b/Doc/library/inspect.rst index 81824dd..1cc503a 100644 --- a/Doc/library/inspect.rst +++ b/Doc/library/inspect.rst @@ -169,6 +169,9 @@ attributes: | | | variables (referenced via | | | | a function's closure) | +-----------+-------------------+---------------------------+ +| | co_posonlyargcount| number of positional only | +| | | arguments | ++-----------+-------------------+---------------------------+ | | co_kwonlyargcount | number of keyword only | | | | arguments (not including | | | | \*\* arg) | @@ -724,13 +727,9 @@ function. | Name | Meaning | +========================+==============================================+ | *POSITIONAL_ONLY* | Value must be supplied as a positional | - | | argument. | - | | | - | | Python has no explicit syntax for defining | - | | positional-only parameters, but many built-in| - | | and extension module functions (especially | - | | those that accept only one or two parameters)| - | | accept them. | + | | argument. Positional only parameters are | + | | those which appear before a ``/`` entry (if | + | | present) in a Python function definition. | +------------------------+----------------------------------------------+ | *POSITIONAL_OR_KEYWORD*| Value may be supplied as either a keyword or | | | positional argument (this is the standard | |