Commit 26e0f512 authored by Walter Dörwald's avatar Walter Dörwald

Mention name of left operand, if "foo in unicode_string"

fails.
parent 42748a8d
......@@ -6001,8 +6001,9 @@ int PyUnicode_Contains(PyObject *container,
/* Coerce the two arguments */
sub = PyUnicode_FromObject(element);
if (!sub) {
PyErr_SetString(PyExc_TypeError,
"'in <string>' requires string as left operand");
PyErr_Format(PyExc_TypeError,
"'in <string>' requires string as left operand, not %s",
element->ob_type->tp_name);
return -1;
}
......
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