[Python-checkins] bpo-17050: Remove documentation on argparse.REMAINDER (GH-18661)

Albert webhook-mailer at python.org
Sun May 24 14:57:47 EDT 2020


https://github.com/python/cpython/commit/59f5022b5d3e5fcc60ac61cc256b627decf8ee68
commit: 59f5022b5d3e5fcc60ac61cc256b627decf8ee68
branch: master
author: Albert <me at albert.sh>
committer: GitHub <noreply at github.com>
date: 2020-05-24T11:57:40-07:00
summary:

bpo-17050: Remove documentation on argparse.REMAINDER (GH-18661)



Closes [Issue 17050]() by removing argparse.REMAINDER from the documentation, as discussed on the issue.

Automerge-Triggered-By: @rhettinger

files:
M Doc/library/argparse.rst

diff --git a/Doc/library/argparse.rst b/Doc/library/argparse.rst
index f8e3918968620..5e0096cae73a7 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.



More information about the Python-checkins mailing list