mirror of
https://github.com/python/cpython.git
synced 2025-08-01 23:53:15 +00:00
Improve TypeError exception message for list catenation.
This commit is contained in:
parent
b6a9ada757
commit
914a2edb24
1 changed files with 2 additions and 2 deletions
|
@ -389,8 +389,8 @@ list_concat(a, bb)
|
||||||
PyListObject *np;
|
PyListObject *np;
|
||||||
if (!PyList_Check(bb)) {
|
if (!PyList_Check(bb)) {
|
||||||
PyErr_Format(PyExc_TypeError,
|
PyErr_Format(PyExc_TypeError,
|
||||||
"can only append list (not \"%.200s\") to list",
|
"can only concatenate list (not \"%.200s\") to list",
|
||||||
bb->ob_type->tp_name);
|
bb->ob_type->tp_name);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
#define b ((PyListObject *)bb)
|
#define b ((PyListObject *)bb)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue