10000 gh-99735: Use required=True in argparse subparsers example (GH-100927) · miss-islington/cpython@0288d9b · GitHub
[go: up one dir, main page]

Skip to content

Commit 0288d9b

Browse files
ppaezmiss-islington
authored andcommitted
pythongh-99735: Use required=True in argparse subparsers example (pythonGH-100927)
(cherry picked from commit 6aab56f) Co-authored-by: Patricio Paez <nospam@pp.com.mx>
1 parent 62db23c commit 0288d9b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Doc/library/argparse.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1854,7 +1854,7 @@ Sub-commands
18541854
...
18551855
>>> # create the top-level parser
18561856
>>> parser = argparse.ArgumentParser()
1857-
>>> subparsers = parser.add_subparsers()
1857+
>>> subparsers = parser.add_subparsers(required=True)
18581858
>>>
18591859
>>> # create the parser for the "foo" command
18601860
>>> parser_foo = subparsers.add_parser('foo')

0 commit comments

Comments
 (0)
0