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
+8-18Lines changed: 8 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1722,33 +1722,23 @@ Subcommands
1722
1722
1723
1723
Description of parameters:
1724
1724
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
1725
+
* *title* - title for the sub-parser group in help output; by default "subcommands" if description is provided, otherwise uses title for positional arguments
1728
1726
1729
-
* *description* - description for the sub-parser group in help output, by
1730
-
default ``None``
1727
+
* *description* - description for the sub-parser group in help output, by default ``None``
1731
1728
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
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
1735
1730
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`)
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`)
1738
1732
1739
-
* action_ - the basic type of action to be taken when this argument is
1740
-
encountered at the command line
1733
+
* action_ - the basic type of action to be taken when this argument is encountered at the command line
1741
1734
1742
-
* dest_ - name of the attribute under which subcommand name will be
1743
-
stored; by default ``None`` and no value is stored
1735
+
* dest_ - name of the attribute under which subcommand name will be stored; by default ``None`` and no value is stored
1744
1736
1745
-
* required_ - Whether or not a subcommand must be provided, by default
1746
-
``False`` (added in 3.7)
1737
+
* required_ - Whether or not a subcommand must be provided, by default ``False`` (added in 3.7)
1747
1738
1748
1739
* help_ - help for sub-parser group in help output, by default ``None``
1749
1740
1750
-
* metavar_ - string presenting available subcommands in help; by default it
1751
-
is ``None`` and presents subcommands in form {cmd1, cmd2, ..}
1741
+
* metavar_ - string presenting available subcommands in help; by default it is ``None`` and presents subcommands in form {cmd1, cmd2, ..}
0 commit comments