You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Doc/library/argparse.rst
+22-12Lines changed: 22 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1722,23 +1722,33 @@ Subcommands
1722
1722
1723
1723
Description of parameters:
1724
1724
1725
-
* *title* - title for the sub-parser group in help output; by default "subcommands" if description is provided, otherwise uses title for positional arguments
1725
+
* *title* - title for the sub-parser group in help output; by default
1726
+
"subcommands" if description is provided, otherwise uses title for
1727
+
positional arguments
1726
1728
1727
-
* *description* - description for the sub-parser group in help output, by default ``None``
1729
+
* *description* - description for the sub-parser group in help output, by
1730
+
default ``None``
1728
1731
1729
-
* *prog* - usage information that will be displayed with subcommand help, by default the name of the program and any positional arguments before the subparser argument
1732
+
* *prog* - usage information that will be displayed with subcommand help,
1733
+
by default the name of the program and any positional arguments before the
1734
+
subparser argument
1730
1735
1731
-
* *parser_class* - class which will be used to create sub-parser instances, by default the class of the current parser (e.g. :class:`ArgumentParser`)
1736
+
* *parser_class* - class which will be used to create sub-parser instances, by
1737
+
default the class of the current parser (e.g. :class:`ArgumentParser`)
1732
1738
1733
-
* action_ - the basic type of action to be taken when this argument is encountered at the command line
1739
+
* action_ - the basic type of action to be taken when this argument is
1740
+
encountered at the command line
1734
1741
1735
-
* dest_ - name of the attribute under which subcommand name will be stored; by default ``None`` and no value is stored
1742
+
* dest_ - name of the attribute under which subcommand name will be
1743
+
stored; by default ``None`` and no value is stored
1736
1744
1737
-
* required_ - Whether or not a subcommand must be provided, by default ``False`` (added in 3.7)
1745
+
* required_ - Whether or not a subcommand must be provided, by default
1746
+
``False`` (added in 3.7)
1738
1747
1739
1748
* help_ - help for sub-parser group in help output, by default ``None``
1740
1749
1741
-
* metavar_ - string presenting available subcommands in help; by default it is ``None`` and presents subcommands in form {cmd1, cmd2, ..}
1750
+
* metavar_ - string presenting available subcommands in help; by default it
1751
+
is ``None`` and presents subcommands in form {cmd1, cmd2, ..}
0 commit comments