summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorJade Lovelace <software@lfcode.ca>2022-01-02 20:16:25 (GMT)
committerGitHub <noreply@github.com>2022-01-02 20:16:25 (GMT)
commit8e75c6b49b7cb8515b917f01b32ece8c8ea2c0a0 (patch)
treeaf31bd29556b4061127f37613fd7faa98f768617 /Doc/library
parentba00f0d93a4aea85ae8089f139856a7c450584d7 (diff)
downloadcpython-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 'Doc/library')
-rw-r--r--Doc/library/argparse.rst3
1 files changed, 2 insertions, 1 deletions
diff --git a/Doc/library/argparse.rst b/Doc/library/argparse.rst
index 80c382a..e050d62 100644
--- a/Doc/library/argparse.rst
+++ b/Doc/library/argparse.rst
@@ -148,7 +148,8 @@ ArgumentParser objects
as keyword arguments. Each parameter has its own more detailed description
below, but in short they are:
- * prog_ - The name of the program (default: ``sys.argv[0]``)
+ * prog_ - The name of the program (default:
+ ``os.path.basename(sys.argv[0])``)
* usage_ - The string describing the program usage (default: generated from
arguments added to parser)