diff options
author | Guido van Rossum <guido@python.org> | 1998-08-25 18:16:54 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1998-08-25 18:16:54 (GMT) |
commit | 2d1ad39b8137e31c1ba80f85e264a0c450c7ef26 (patch) | |
tree | 28b6fe3a53c12aecc8cf0aab494b7ca86d7289c5 /Python/ceval.c | |
parent | 6e73bf403234be6fde0ad466208a9217f5f1ed95 (diff) | |
download | cpython-2d1ad39b8137e31c1ba80f85e264a0c450c7ef26.zip cpython-2d1ad39b8137e31c1ba80f85e264a0c450c7ef26.tar.gz cpython-2d1ad39b8137e31c1ba80f85e264a0c450c7ef26.tar.bz2 |
Add the type of the object to the error message about calling a non-function.
Diffstat (limited to 'Python/ceval.c')
-rw-r--r-- | Python/ceval.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index ff5ee50..0178f84 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -2369,7 +2369,8 @@ call_builtin(func, arg, kw) Py_DECREF(call); return res; } - PyErr_SetString(PyExc_TypeError, "call of non-function"); + PyErr_Format(PyExc_TypeError, "call of non-function (type %s)", + func->ob_type->tp_name); return NULL; } @@ -2438,8 +2439,9 @@ call_function(func, arg, kw) } else { if (!PyFunction_Check(func)) { - PyErr_SetString(PyExc_TypeError, - "call of non-function"); + PyErr_Format(PyExc_TypeError, + "call of non-function (type %s)", + func->ob_type->tp_name); return NULL; } Py_INCREF(arg); |