summaryrefslogtreecommitdiffstats
path: root/Objects/tupleobject.c
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2000-06-01 03:12:13 (GMT)
committerFred Drake <fdrake@acm.org>2000-06-01 03:12:13 (GMT)
commitb6a9ada757a99023e286addc6f2947747a8105ec (patch)
treed79372c01437217f7a14663ddf379f487dd73cf8 /Objects/tupleobject.c
parent94c3452ade3dbc2c09e772b0507084551fe49b4c (diff)
downloadcpython-b6a9ada757a99023e286addc6f2947747a8105ec.zip
cpython-b6a9ada757a99023e286addc6f2947747a8105ec.tar.gz
cpython-b6a9ada757a99023e286addc6f2947747a8105ec.tar.bz2
Michael Hudson <mwh21@cam.ac.uk>:
Removed PyErr_BadArgument() calls and replaced them with more useful error messages.
Diffstat (limited to 'Objects/tupleobject.c')
-rw-r--r--Objects/tupleobject.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Objects/tupleobject.c b/Objects/tupleobject.c
index d5d6a07..c26b7df 100644
--- a/Objects/tupleobject.c
+++ b/Objects/tupleobject.c
@@ -361,7 +361,9 @@ tupleconcat(a, bb)
register int i;
PyTupleObject *np;
if (!PyTuple_Check(bb)) {
- PyErr_BadArgument();
+ PyErr_Format(PyExc_TypeError,
+ "can only append tuple (not \"%.200s\") to tuple",
+ bb->ob_type->tp_name);
return NULL;
}
#define b ((PyTupleObject *)bb)