Skip to content

Commit

Permalink
pythongh-99735: Use required=True in argparse subparsers example (pyt…
Browse files Browse the repository at this point in the history
…honGH-100927)

(cherry picked from commit 6aab56f)

Co-authored-by: Patricio Paez <[email protected]>
  • Loading branch information
ppaez authored and miss-islington committed Feb 19, 2023
1 parent 62db23c commit 0288d9b
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 @@ -1854,7 +1854,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 0288d9b

Please sign in to comment.