cpython: d5027e489c25 (original) (raw)

Mercurial > cpython

changeset 86111:d5027e489c25 2.7

Closes #11807: document argparse add_subparsers method better. Patch by Filip GruszczyƄski. [#11807]

Georg Brandl georg@python.org
date Sun, 06 Oct 2013 18:51:39 +0200
parents 3e5078c3784e
children 74ae6064d3e8
files Doc/library/argparse.rst
diffstat 1 files changed, 28 insertions(+), 1 deletions(-)[+] [-] Doc/library/argparse.rst 29

line wrap: on

line diff

--- a/Doc/library/argparse.rst +++ b/Doc/library/argparse.rst @@ -1432,7 +1432,10 @@ Other utilities Sub-commands ^^^^^^^^^^^^ -.. method:: ArgumentParser.add_subparsers() +.. method:: ArgumentParser.add_subparsers([title], [description], [prog], [](#l1.8)

Many programs split up their functionality into a number of sub-commands, for example, the svn program can invoke sub-commands like ``svn @@ -1446,6 +1449,30 @@ Sub-commands command name and any :class:ArgumentParser constructor arguments, and returns an :class:ArgumentParser object that can be modified as usual.

+

+

+

+

+

+ Some example usage:: >>> # create the top-level parser