Mention name of left operand, if "foo in unicode_string"
fails.
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index 39b7462..bb4036a 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -6001,8 +6001,9 @@
/* 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;
}