From 3e3e8976b8096ae1c52432bd3be15784ea82d956 Mon Sep 17 00:00:00 2001 From: slateny <46876382+slateny@users.noreply.github.com> Date: Fri, 13 May 2022 07:17:07 -0700 Subject: bpo-9182: Add a section on specifying positional arguments (#31810) --- Doc/library/argparse.rst | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'Doc/library/argparse.rst') 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 ` +for more details. + .. _prefix-matching: Argument abbreviations (prefix matching) -- cgit v1.2.1