Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf193fad

Browse files
gh-99735: Use required=True in argparse subparsers example (GH-100927)
(cherry picked from commit6aab56f)Co-authored-by: Patricio Paez <nospam@pp.com.mx>
1 parent8520e6c commitf193fad

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
@@ -1771,7 +1771,7 @@ Sub-commands
17711771
...
17721772
>>> # create the top-level parser
17731773
>>> parser = argparse.ArgumentParser()
1774-
>>> subparsers = parser.add_subparsers()
1774+
>>> subparsers = parser.add_subparsers(required=True)
17751775
>>>
17761776
>>> # create the parser for the "foo" command
17771777
>>> parser_foo = subparsers.add_parser('foo')

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp