Skip to content

Commit

Permalink
Renamed section Subparsers -> Subcommands
Browse files Browse the repository at this point in the history
  • Loading branch information
p-ranav authored Sep 21, 2022
1 parent c879553 commit c91fc84
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
* [Default Arguments](#default-arguments)
* [Gathering Remaining Arguments](#gathering-remaining-arguments)
* [Parent Parsers](#parent-parsers)
* [Subparsers](#subparsers)
* [Subcommands](#subcommands)
* [Further Examples](#further-examples)
* [Construct a JSON object from a filename argument](#construct-a-json-object-from-a-filename-argument)
* [Positional Arguments with Compound Toggle Arguments](#positional-arguments-with-compound-toggle-arguments)
Expand Down Expand Up @@ -693,7 +693,7 @@ bar_parser.parse_args({ "./main", "--bar", "YYY" }); // bar = YYY
Note You must fully initialize the parsers before passing them via ```.add_parents```. If you change the parent parsers after the child parser, those changes will not be reflected in the child.
### Subparsers
### Subcommands
Many programs split up their functionality into a number of sub-commands, for example, the `git` program can invoke sub-commands like `git checkout`, `git add`, and `git commit`. Splitting up functionality this way can be a particularly good idea when a program performs several different functions which require different kinds of command-line arguments. `ArgumentParser` supports the creation of such sub-commands with the `add_subparser()` member function.
Expand Down

0 comments on commit c91fc84

Please sign in to comment.