summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2020-05-24 21:31:17 (GMT)
committerGitHub <noreply@github.com>2020-05-24 21:31:17 (GMT)
commit46c1b9c7b595cd9244020ff74ff9cb11bec9870c (patch)
treeb35b918adc9b748d08b6537fd0ab3c6ebb5c5c24
parent4bb4cde1777267c92c1bfc0f537cee08102d66a4 (diff)
downloadcpython-46c1b9c7b595cd9244020ff74ff9cb11bec9870c.zip
cpython-46c1b9c7b595cd9244020ff74ff9cb11bec9870c.tar.gz
cpython-46c1b9c7b595cd9244020ff74ff9cb11bec9870c.tar.bz2
bpo-17050: Remove documentation on argparse.REMAINDER (GH-18661) (GH-20363)
-rw-r--r--Doc/library/argparse.rst13
1 files changed, 0 insertions, 13 deletions
diff --git a/Doc/library/argparse.rst b/Doc/library/argparse.rst
index f8e3918..5e0096c 100644
--- a/Doc/library/argparse.rst
+++ b/Doc/library/argparse.rst
@@ -961,19 +961,6 @@ values are:
usage: PROG [-h] foo [foo ...]
PROG: error: the following arguments are required: foo
-.. _`argparse.REMAINDER`:
-
-* ``argparse.REMAINDER``. All the remaining command-line arguments are gathered
- into a list. This is commonly useful for command line utilities that dispatch
- to other command line utilities::
-
- >>> parser = argparse.ArgumentParser(prog='PROG')
- >>> parser.add_argument('--foo')
- >>> parser.add_argument('command')
- >>> parser.add_argument('args', nargs=argparse.REMAINDER)
- >>> print(parser.parse_args('--foo B cmd --arg1 XX ZZ'.split()))
- Namespace(args=['--arg1', 'XX', 'ZZ'], command='cmd', foo='B')
-
If the ``nargs`` keyword argument is not provided, the number of arguments consumed
is determined by the action_. Generally this means a single command-line argument
will be consumed and a single item (not a list) will be produced.