diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2024-10-30 16:14:27 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-30 16:14:27 (GMT) |
commit | cc9a1839930d30450b12c460eee58137e3a3d6f1 (patch) | |
tree | db14b19fff9351f42b2819a76b6b98e5ba154cbd /Misc/NEWS.d | |
parent | 1f16df4bfe5cfbe4ac40cc9c6d15f44bcfd99a64 (diff) | |
download | cpython-cc9a1839930d30450b12c460eee58137e3a3d6f1.zip cpython-cc9a1839930d30450b12c460eee58137e3a3d6f1.tar.gz cpython-cc9a1839930d30450b12c460eee58137e3a3d6f1.tar.bz2 |
gh-126068: Fix exceptions in the argparse module (GH-126069)
* Only error messages for ArgumentError and ArgumentTypeError are now
translated.
* ArgumentError is now only used for command line errors, not for logical
errors in the program.
* TypeError is now raised instead of ValueError for some logical errors.
Diffstat (limited to 'Misc/NEWS.d')
-rw-r--r-- | Misc/NEWS.d/next/Library/2024-10-28-11-33-59.gh-issue-126068.Pdznm_.rst | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2024-10-28-11-33-59.gh-issue-126068.Pdznm_.rst b/Misc/NEWS.d/next/Library/2024-10-28-11-33-59.gh-issue-126068.Pdznm_.rst new file mode 100644 index 0000000..a0faf61 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2024-10-28-11-33-59.gh-issue-126068.Pdznm_.rst @@ -0,0 +1,5 @@ +Fix exceptions in the :mod:`argparse` module so that only error messages for +ArgumentError and ArgumentTypeError are now translated. +ArgumentError is now only used for command line errors, not for logical +errors in the program. TypeError is now raised instead of ValueError for +some logical errors. |