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
ppaez authored and miss-islington committed Feb 19, 2023
1 parent d104234 commit 6f8c2be
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 @@ -1771,7 +1771,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 6f8c2be

Please sign in to comment.