From: Benjamin Peterson Date: Sat, 31 Jan 2009 16:52:03 +0000 (+0000) Subject: PyErr_BadInternalCall() raises a SystemError, not TypeError #5112 X-Git-Tag: v2.7a1~2157 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0ef803ff0f95d7bcf0090ff9677c595e04d76a69;p=python PyErr_BadInternalCall() raises a SystemError, not TypeError #5112 --- diff --git a/Doc/c-api/exceptions.rst b/Doc/c-api/exceptions.rst index 536b123af7..1cdce3fb3b 100644 --- a/Doc/c-api/exceptions.rst +++ b/Doc/c-api/exceptions.rst @@ -282,9 +282,10 @@ is a separate error indicator for each thread. .. cfunction:: void PyErr_BadInternalCall() - This is a shorthand for ``PyErr_SetString(PyExc_TypeError, message)``, where - *message* indicates that an internal operation (e.g. a Python/C API function) - was invoked with an illegal argument. It is mostly for internal use. + This is a shorthand for ``PyErr_SetString(PyExc_SystemError, message)``, + where *message* indicates that an internal operation (e.g. a Python/C API + function) was invoked with an illegal argument. It is mostly for internal + use. .. cfunction:: int PyErr_WarnEx(PyObject *category, char *message, int stacklevel)