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

This commit is contained in:
Miss Islington (bot) 2022-01-02 13:29:35 -08:00 committed by GitHub
parent 35955e4ade
commit 74af713538
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View file

@ -1672,7 +1672,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