Kaydet (Commit) 26e0f512 authored tarafından Walter Dörwald's avatar Walter Dörwald

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

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