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 <nospam@pp.com.mx>
  • Loading branch information
miss-islington and ppaez authored Feb 19, 2023
1 parent 62db23c commit 4969903
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 4969903

Please sign in to comment.