Mercurial > cpython-lru_cache-weakref
diff Objects/unicodeobject.c @ 41658:7fe6afcbd3f2
Mention type in the exception message.
| author | Walter Dörwald <walter@livinglogic.de> |
|---|---|
| date | Wed, 09 May 2007 10:39:19 +0000 |
| parents | 554ff27145e1 |
| children | 7993f23ad46c |
line wrap: on
line diff
--- a/Objects/unicodeobject.c Wed May 09 00:01:30 2007 +0000 +++ b/Objects/unicodeobject.c Wed May 09 10:39:19 2007 +0000 @@ -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; }
