summaryrefslogtreecommitdiffstats
path: root/Objects/listobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/listobject.c')
-rw-r--r--Objects/listobject.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/Objects/listobject.c b/Objects/listobject.c
index f70d19b..661a53b 100644
--- a/Objects/listobject.c
+++ b/Objects/listobject.c
@@ -388,7 +388,9 @@ list_concat(a, bb)
int i;
PyListObject *np;
if (!PyList_Check(bb)) {
- PyErr_BadArgument();
+ PyErr_Format(PyExc_TypeError,
+ "can only append list (not \"%.200s\") to list",
+ bb->ob_type->tp_name);
return NULL;
}
#define b ((PyListObject *)bb)
@@ -469,7 +471,9 @@ list_ass_slice(a, ilow, ihigh, v)
}
}
else {
- PyErr_BadArgument();
+ PyErr_Format(PyExc_TypeError,
+ "must assign list (not \"%.200s\") to slice",
+ v->ob_type->tp_name);
return -1;
}
if (ilow < 0)