summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
author9cel <9based@gmail.com>2025-01-11 09:17:35 (GMT)
committerGitHub <noreply@github.com>2025-01-11 09:17:35 (GMT)
commit3a570c6d58bd5ad7d7c13b24dafccc2701081d9f (patch)
tree68016b31cbfd6d0b591ba8fd9be8cc77ea407c6a /Python
parent553cdc6d6856c1b4539a45eb90d0769f7c629355 (diff)
downloadcpython-3a570c6d58bd5ad7d7c13b24dafccc2701081d9f.zip
cpython-3a570c6d58bd5ad7d7c13b24dafccc2701081d9f.tar.gz
cpython-3a570c6d58bd5ad7d7c13b24dafccc2701081d9f.tar.bz2
Make the Python CLI error message style more consistent (GH-128129)
Diffstat (limited to 'Python')
-rw-r--r--Python/getopt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/getopt.c b/Python/getopt.c
index f64c89f..39a6938 100644
--- a/Python/getopt.c
+++ b/Python/getopt.c
@@ -102,7 +102,7 @@ int _PyOS_GetOpt(Py_ssize_t argc, wchar_t * const *argv, int *longindex)
// Parse long option.
if (*opt_ptr == L'\0') {
if (_PyOS_opterr) {
- fprintf(stderr, "expected long option\n");
+ fprintf(stderr, "Expected long option\n");
}
return -1;
}
@@ -114,7 +114,7 @@ int _PyOS_GetOpt(Py_ssize_t argc, wchar_t * const *argv, int *longindex)
}
if (!opt->name) {
if (_PyOS_opterr) {
- fprintf(stderr, "unknown option %ls\n", argv[_PyOS_optind - 1]);
+ fprintf(stderr, "Unknown option: %ls\n", argv[_PyOS_optind - 1]);
}
return '_';
}