From 0288d9ba10eec3db0ab7a6da03f2a0a1c0c63715 Mon Sep 17 00:00:00 2001 From: Patricio Paez Date: Sat, 18 Feb 2023 19:06:03 -0600 Subject: [PATCH] gh-99735: Use required=True in argparse subparsers example (GH-100927) (cherry picked from commit 6aab56f3c2ee331116eba242d2fcdca592577328) Co-authored-by: Patricio Paez --- Doc/library/argparse.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/argparse.rst b/Doc/library/argparse.rst index eeb65160bbc8ef..7a36c5264aa0e7 100644 --- a/Doc/library/argparse.rst +++ b/Doc/library/argparse.rst @@ -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') pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy