diff options
author | slateny <46876382+slateny@users.noreply.github.com> | 2022-05-13 07:17:07 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-13 09:17:07 -0500 |
commit | 3e3e8976b8096ae1c52432bd3be15784ea82d956 (patch) | |
tree | 63ac25c5bb2d8abb67be647465801e53a9568e0d /Doc/library/argparse.rst | |
parent | 57da3ff586c66a8d08abbee37736b9fb6f0b7112 (diff) | |
download | cpython-git-3e3e8976b8096ae1c52432bd3be15784ea82d956.tar.gz |
bpo-9182: Add a section on specifying positional arguments (#31810)
Diffstat (limited to 'Doc/library/argparse.rst')
-rw-r--r-- | Doc/library/argparse.rst | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Doc/library/argparse.rst b/Doc/library/argparse.rst index 1f40e4a845..83dd3cdf03 100644 --- a/Doc/library/argparse.rst +++ b/Doc/library/argparse.rst @@ -951,8 +951,8 @@ nargs ArgumentParser objects usually associate a single command-line argument with a single action to be taken. The ``nargs`` keyword argument associates a -different number of command-line arguments with a single action. The supported -values are: +different number of command-line arguments with a single action. +See also :ref:`specifying-ambiguous-arguments`. The supported values are: * ``N`` (an integer). ``N`` arguments from the command line will be gathered together into a list. For example:: @@ -1610,6 +1610,9 @@ argument:: >>> parser.parse_args(['--', '-f']) Namespace(foo='-f', one=None) +See also :ref:`the argparse howto on ambiguous arguments <specifying-ambiguous-arguments>` +for more details. + .. _prefix-matching: Argument abbreviations (prefix matching) |