Skip to content

Commit 35d9c37

Browse files
bpo-37695: Correct unget_wch error message. (GH-14986)
(cherry picked from commit c9345e3) Co-authored-by: Anthony Sottile <[email protected]>
1 parent 33b700b commit 35d9c37

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Correct :func:`curses.unget_wch` error message. Patch by Anthony Sottile.

Modules/_cursesmodule.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3120,7 +3120,7 @@ PyCurses_ConvertToWchar_t(PyObject *obj,
31203120
wchar_t buffer[2];
31213121
if (PyUnicode_AsWideChar(obj, buffer, 2) != 1) {
31223122
PyErr_Format(PyExc_TypeError,
3123-
"expect bytes or str of length 1, or int, "
3123+
"expect str of length 1 or int, "
31243124
"got a str of length %zi",
31253125
PyUnicode_GET_LENGTH(obj));
31263126
return 0;
@@ -3147,7 +3147,7 @@ PyCurses_ConvertToWchar_t(PyObject *obj,
31473147
}
31483148
else {
31493149
PyErr_Format(PyExc_TypeError,
3150-
"expect bytes or str of length 1, or int, got %s",
3150+
"expect str of length 1 or int, got %s",
31513151
Py_TYPE(obj)->tp_name);
31523152
return 0;
31533153
}

0 commit comments

Comments
 (0)