summaryrefslogtreecommitdiff
path: root/Cython/Utility/CythonFunction.c
diff options
context:
space:
mode:
Diffstat (limited to 'Cython/Utility/CythonFunction.c')
-rw-r--r--Cython/Utility/CythonFunction.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Cython/Utility/CythonFunction.c b/Cython/Utility/CythonFunction.c
index 5ea48ea94..b2c67dcce 100644
--- a/Cython/Utility/CythonFunction.c
+++ b/Cython/Utility/CythonFunction.c
@@ -660,6 +660,9 @@ static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, P
self = PyTuple_GetItem(args, 0);
if (unlikely(!self)) {
Py_DECREF(new_args);
+ PyErr_Format(PyExc_TypeError,
+ "unbound method %.200S() needs an argument",
+ cyfunc->func_qualname);
return NULL;
}