summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Objects/stringobject.c2
-rw-r--r--Objects/unicodeobject.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/Objects/stringobject.c b/Objects/stringobject.c
index ce6548b..5d754b0 100644
--- a/Objects/stringobject.c
+++ b/Objects/stringobject.c
@@ -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];
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index 5548748..1ea83f6 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -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);