Skip to content

Commit

Permalink
gh-99735: Use required=True in argparse subparsers example (#100927)
Browse files Browse the repository at this point in the history
  • Loading branch information
ppaez authored Feb 19, 2023
1 parent 36b6709 commit 6aab56f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Doc/library/argparse.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1867,7 +1867,7 @@ Sub-commands
...
>>> # create the top-level parser
>>> parser = argparse.ArgumentParser()
>>> subparsers = parser.add_subparsers()
>>> subparsers = parser.add_subparsers(required=True)
>>>
>>> # create the parser for the "foo" command
>>> parser_foo = subparsers.add_parser('foo')
Expand Down

0 comments on commit 6aab56f

Please sign in to comment.