summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorAndrew M. Kuchling <amk@amk.ca>2000-06-09 14:04:53 (GMT)
committerAndrew M. Kuchling <amk@amk.ca>2000-06-09 14:04:53 (GMT)
commitcb95a1470ace2d64db306f51203852e8d6d43d1b (patch)
tree4579437b407882409f374658a1e678a9990c149b /Objects
parentb422f95db091ffc5ca8ef44bc6efcf4e772cd676 (diff)
downloadcpython-cb95a1470ace2d64db306f51203852e8d6d43d1b.zip
cpython-cb95a1470ace2d64db306f51203852e8d6d43d1b.tar.gz
cpython-cb95a1470ace2d64db306f51203852e8d6d43d1b.tar.bz2
Patch from Michael Hudson: improve unclear error message
Diffstat (limited to 'Objects')
-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);