diff options
Diffstat (limited to 'Objects/stringobject.c')
| -rw-r--r-- | Objects/stringobject.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Objects/stringobject.c b/Objects/stringobject.c index f17fbf1a06..ce6548b6f6 100644 --- a/Objects/stringobject.c +++ b/Objects/stringobject.c @@ -293,7 +293,9 @@ string_concat(a, bb) if (!PyString_Check(bb)) { if (PyUnicode_Check(bb)) return PyUnicode_Concat((PyObject *)a, bb); - PyErr_BadArgument(); + PyErr_Format(PyExc_TypeError, + "cannot add type \"%.200s\" to string", + bb->ob_type->tp_name); return NULL; } #define b ((PyStringObject *)bb) |
