diff options
author | Patricio Paez <nospam@pp.com.mx> | 2023-02-19 01:06:03 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-19 01:06:03 (GMT) |
commit | 6aab56f3c2ee331116eba242d2fcdca592577328 (patch) | |
tree | 32a33d58d5ce0453a7e32fe7cd9d9372be52ba20 | |
parent | 36b670908b3546f46283aae4dbf311e53289f3d1 (diff) | |
download | cpython-6aab56f3c2ee331116eba242d2fcdca592577328.zip cpython-6aab56f3c2ee331116eba242d2fcdca592577328.tar.gz cpython-6aab56f3c2ee331116eba242d2fcdca592577328.tar.bz2 |
gh-99735: Use required=True in argparse subparsers example (#100927)
-rw-r--r-- | Doc/library/argparse.rst | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/library/argparse.rst b/Doc/library/argparse.rst index dbaa5d0..34b4c61 100644 --- a/Doc/library/argparse.rst +++ b/Doc/library/argparse.rst @@ -1867,7 +1867,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') |