Kaydet (Commit) 7c014684 authored tarafından Marc-André Lemburg's avatar Marc-André Lemburg

Marc-Andre Lemburg <mal@lemburg.com>:

Better error message for "1 in unicodestring". Submitted
by Andrew Kuchling.
üst e39607f2
......@@ -2988,8 +2988,11 @@ int PyUnicode_Contains(PyObject *container,
/* Coerce the two arguments */
v = (PyUnicodeObject *)PyUnicode_FromObject(element);
if (v == NULL)
if (v == NULL) {
PyErr_SetString(PyExc_TypeError,
"'in <string>' requires character as left operand");
goto onError;
}
u = (PyUnicodeObject *)PyUnicode_FromObject(container);
if (u == NULL) {
Py_DECREF(v);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment