]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-66436: Improved prog default value for argparse.ArgumentParser (GH-124799)
authorSerhiy Storchaka <storchaka@gmail.com>
Tue, 1 Oct 2024 19:51:40 +0000 (22:51 +0300)
committerGitHub <noreply@github.com>
Tue, 1 Oct 2024 19:51:40 +0000 (22:51 +0300)
commit04bfea2d261bced371cbd64931fe2a8f64984793
tree8372ec5d0620ed6bcda6dbc2f5e6f5a5bca9cf8e
parentd150e4abcfc13770c2d239878ed337fb53e51de5
gh-66436: Improved prog default value for argparse.ArgumentParser (GH-124799)

It can now have one of three forms:

* basename(argv0) -- for simple scripts
* python arv0 -- for directories, ZIP files, etc
* python -m module -- for imported modules

Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
Doc/library/argparse.rst
Doc/whatsnew/3.14.rst
Lib/argparse.py
Lib/test/test_argparse.py
Lib/test/test_calendar.py
Misc/NEWS.d/next/Library/2024-09-30-19-59-28.gh-issue-66436.4gYN_n.rst [new file with mode: 0644]