8000 [3.10] gh-99735: Use required=True in argparse subparsers example (GH-100927) by miss-islington · Pull Request #102037 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

[3.10] gh-99735: Use required=True in argparse subparsers example (GH-100927) #102037

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
gh-99735: Use required=True in argparse subparsers example (GH-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
commit 6f8c2be0b63ff5bbd9f0a2866f3a207fb687badd
2 changes: 1 addition & 1 deletion Doc/library/argparse.rst
Ori 5E02 ginal 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