cpython: 35665f6f3674 (original) (raw)

Mercurial > cpython

changeset 74526:35665f6f3674 2.7

Issue #13605: add documentation for nargs=argparse.REMAINDER [#13605]

Sandro Tosi sandro.tosi@gmail.com
date Thu, 19 Jan 2012 21:59:34 +0100
parents d01208ba482f
children 1b481e76cd16
files Doc/library/argparse.rst
diffstat 1 files changed, 11 insertions(+), 0 deletions(-)[+] [-] Doc/library/argparse.rst 11

line wrap: on

line diff

--- a/Doc/library/argparse.rst +++ b/Doc/library/argparse.rst @@ -838,6 +838,17 @@ values are: usage: PROG [-h] foo [foo ...] PROG: error: too few arguments +* argparse.REMAINDER. All the remaining command-line arguments

+ 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.