diff options
author | Victor Stinner <vstinner@python.org> | 2020-03-12 07:38:11 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-12 07:38:11 (GMT) |
commit | c7d2d69d95b263ee5f83511bc6fbe53acdc24ea3 (patch) | |
tree | 216d0a5fa669354114a2500bc0cd0d623d61de44 /Objects/methodobject.c | |
parent | 1dd3794b19cfec448e5a55d8d01efd6bdb5a1169 (diff) | |
download | cpython-c7d2d69d95b263ee5f83511bc6fbe53acdc24ea3.zip cpython-c7d2d69d95b263ee5f83511bc6fbe53acdc24ea3.tar.gz cpython-c7d2d69d95b263ee5f83511bc6fbe53acdc24ea3.tar.bz2 |
bpo-39884: Add method name in "bad call flags" error (GH-18944)
PyDescr_NewMethod() and PyCFunction_NewEx() now include the method
name in the SystemError "bad call flags" error message to ease debug.
Diffstat (limited to 'Objects/methodobject.c')
-rw-r--r-- | Objects/methodobject.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Objects/methodobject.c b/Objects/methodobject.c index 0d45705..16abded 100644 --- a/Objects/methodobject.c +++ b/Objects/methodobject.c @@ -56,7 +56,8 @@ PyCFunction_NewEx(PyMethodDef *ml, PyObject *self, PyObject *module) vectorcall = cfunction_vectorcall_O; break; default: - PyErr_SetString(PyExc_SystemError, "bad call flags"); + PyErr_Format(PyExc_SystemError, + "%s() method: bad call flags", ml->ml_name); return NULL; } |