mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +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
|
@ -393,7 +393,7 @@ PyObject *a, *el;
|
|||
return PyUnicode_Contains(a, el);
|
||||
if (!PyString_Check(el) || PyString_Size(el) != 1) {
|
||||
PyErr_SetString(PyExc_TypeError,
|
||||
"string member test needs char left operand");
|
||||
"'in <string>' requires character as left operand");
|
||||
return -1;
|
||||
}
|
||||
c = PyString_AsString(el)[0];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue