Author: walter.doerwald
Date: Tue Jun 12 18:51:31 2007
New Revision: 55933
Modified:
python/branches/py3k-struni/Objects/unicodeobject.c
Log:
Mention name of left operand, if "foo in unicode_string"
fails.
Modified: python/branches/py3k-struni/Objects/unicodeobject.c
==============================================================================
--- python/branches/py3k-struni/Objects/unicodeobject.c (original)
+++ python/branches/py3k-struni/Objects/unicodeobject.c Tue Jun 12 18:51:31 2007
@@ -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;
}
_______________________________________________
Python-3000-checkins mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000-checkins