[Python-3000-checkins] r55201 - python/branches/py3k-struni/Objects/unicodeobject.c
walter.doerwald
python-3000-checkins at python.org
Wed May 9 12:39:20 CEST 2007
Author: walter.doerwald
Date: Wed May 9 12:39:19 2007
New Revision: 55201
Modified:
python/branches/py3k-struni/Objects/unicodeobject.c
Log:
Mention type in the exception message.
Modified: python/branches/py3k-struni/Objects/unicodeobject.c
==============================================================================
--- python/branches/py3k-struni/Objects/unicodeobject.c (original)
+++ python/branches/py3k-struni/Objects/unicodeobject.c Wed May 9 12:39:19 2007
@@ -3528,8 +3528,9 @@
return x;
else {
/* wrong return value */
- PyErr_SetString(PyExc_TypeError,
- "character mapping must return integer, None or str");
+ PyErr_Format(PyExc_TypeError,
+ "character mapping must return integer, None or str8, not %.400s",
+ x->ob_type->tp_name);
Py_DECREF(x);
return NULL;
}
More information about the Python-3000-checkins
mailing list