8000 Make getopt error message style more consistent by 9cel · Pull Request #128129 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

Make getopt error message style more consistent #128129

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 11, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Make getopt error message style more consistent
  • Loading branch information
9cel committed Dec 20, 2024
commit 4e963b8b099b45745554419375c9f387c7b6c8ed
4 changes: 2 additions & 2 deletions Python/getopt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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 '_';
}
Expand Down
Loading
0