summaryrefslogtreecommitdiffstats
path: root/Python/bltinmodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/bltinmodule.c')
-rw-r--r--Python/bltinmodule.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c
index ca9f312..66372da 100644
--- a/Python/bltinmodule.c
+++ b/Python/bltinmodule.c
@@ -70,8 +70,9 @@ builtin_apply(PyObject *self, PyObject *args)
if (alist != NULL) {
if (!PyTuple_Check(alist)) {
if (!PySequence_Check(alist)) {
- PyErr_SetString(PyExc_TypeError,
- "apply() arg 2 must be a sequence");
+ PyErr_Format(PyExc_TypeError,
+ "apply() arg 2 expect sequence, found %s",
+ alist->ob_type->tp_name);
return NULL;
}
t = PySequence_Tuple(alist);
@@ -81,8 +82,9 @@ builtin_apply(PyObject *self, PyObject *args)
}
}
if (kwdict != NULL && !PyDict_Check(kwdict)) {
- PyErr_SetString(PyExc_TypeError,
- "apply() arg 3 must be a dictionary");
+ PyErr_Format(PyExc_TypeError,
+ "apply() arg 3 expected dictionary, found %s",
+ kwdict->ob_type->tp_name);
goto finally;
}
retval = PyEval_CallObjectWithKeywords(func, alist, kwdict);