[docs] [issue13605] document argparse's nargs=REMAINDER

Steven Bethard report at bugs.python.org
Thu Dec 15 14:28:30 CET 2011


New submission from Steven Bethard <steven.bethard at gmail.com>:

There is an undocumented value for add_argument's nargs parameter, REMAINDER, which can be used to consume all the remaining arguments. This is commonly useful for command line utilities that dispatch to other command line utilities.

Though undocumented, it has been used successfully by at least a few different people:

http://stackoverflow.com/questions/5826881/how-to-use-argparse-to-collect-arguments-for-a-separate-command-line-without

http://code.google.com/p/argparse/issues/detail?id=52

And I just received an email from yet another user who used it successfully.

So I think it's time to graduate this from a hidden feature to a real documented one.

----------
assignee: docs at python
components: Documentation
messages: 149552
nosy: bethard, docs at python
priority: normal
severity: normal
stage: needs patch
status: open
title: document argparse's nargs=REMAINDER
type: enhancement
versions: Python 3.3

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13605>
_______________________________________


More information about the docs mailing list