argparse docs: prog default is the basename of argv[0] (GH-30298)

This commit is contained in:
Jade Lovelace 2022-01-02 12:16:25 -08:00 committed by GitHub
parent ba00f0d93a
commit 8e75c6b49b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View file

@ -1691,7 +1691,8 @@ class ArgumentParser(_AttributeHolder, _ActionsContainer):
"""Object for parsing command line strings into Python objects.
Keyword Arguments:
- prog -- The name of the program (default: sys.argv[0])
- prog -- The name of the program (default:
``os.path.basename(sys.argv[0])``)
- usage -- A usage message (default: auto-generated from arguments)
- description -- A description of what the program does
- epilog -- Text following the argument descriptions