mirror of
https://github.com/python/cpython.git
synced 2025-10-02 13:22:19 +00:00
gh-99735: Use required=True in argparse subparsers example (GH-100927)
(cherry picked from commit 6aab56f3c2
)
Co-authored-by: Patricio Paez <nospam@pp.com.mx>
This commit is contained in:
parent
62db23c944
commit
4969903f7e
1 changed files with 1 additions and 1 deletions
|
@ -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')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue