mirror of
https://github.com/python/cpython.git
synced 2025-08-25 03:04:55 +00:00
Patch from Michael Hudson: improve unclear error message
This commit is contained in:
parent
b422f95db0
commit
cb95a1470a
2 changed files with 2 additions and 2 deletions
|
@ -2996,7 +2996,7 @@ int PyUnicode_Contains(PyObject *container,
|
|||
/* Check v in u */
|
||||
if (PyUnicode_GET_SIZE(v) != 1) {
|
||||
PyErr_SetString(PyExc_TypeError,
|
||||
"string member test needs char left operand");
|
||||
"'in <string>' requires character as left operand");
|
||||
goto onError;
|
||||
}
|
||||
ch = *PyUnicode_AS_UNICODE(v);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue