Skip to content

Commit 914a2ed

Browse files
committed
Improve TypeError exception message for list catenation.
1 parent b6a9ada commit 914a2ed

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Objects/listobject.c

Lines changed: 2 additions & 2 deletions
Original file line numberOriginal file lineDiff line numberDiff line change
@@ -389,8 +389,8 @@ list_concat(a, bb)
389
PyListObject *np;
389
PyListObject *np;
390
if (!PyList_Check(bb)) {
390
if (!PyList_Check(bb)) {
391
PyErr_Format(PyExc_TypeError,
391
PyErr_Format(PyExc_TypeError,
392-
"can only append list (not \"%.200s\") to list",
392+
"can only concatenate list (not \"%.200s\") to list",
393-
bb->ob_type->tp_name);
393+
bb->ob_type->tp_name);
394
return NULL;
394
return NULL;
395
}
395
}
396
#define b ((PyListObject *)bb)
396
#define b ((PyListObject *)bb)

0 commit comments

Comments
 (0)