diff options
author | Jade Lovelace <software@lfcode.ca> | 2022-01-02 20:16:25 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-02 20:16:25 (GMT) |
commit | 8e75c6b49b7cb8515b917f01b32ece8c8ea2c0a0 (patch) | |
tree | af31bd29556b4061127f37613fd7faa98f768617 /Lib/argparse.py | |
parent | ba00f0d93a4aea85ae8089f139856a7c450584d7 (diff) | |
download | cpython-8e75c6b49b7cb8515b917f01b32ece8c8ea2c0a0.zip cpython-8e75c6b49b7cb8515b917f01b32ece8c8ea2c0a0.tar.gz cpython-8e75c6b49b7cb8515b917f01b32ece8c8ea2c0a0.tar.bz2 |
argparse docs: prog default is the basename of argv[0] (GH-30298)
Diffstat (limited to 'Lib/argparse.py')
-rw-r--r-- | Lib/argparse.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/argparse.py b/Lib/argparse.py index de95eed..1529d9e 100644 --- a/Lib/argparse.py +++ b/Lib/argparse.py @@ -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 |