PyErr_BadInternalCall() raises a SystemError, not TypeError #5112

This commit is contained in:
Benjamin Peterson 2009-01-31 16:52:03 +00:00
parent f709ab8526
commit 0ef803ff0f

View file

@ -282,9 +282,10 @@ is a separate error indicator for each thread.
.. cfunction:: void PyErr_BadInternalCall() .. cfunction:: void PyErr_BadInternalCall()
This is a shorthand for ``PyErr_SetString(PyExc_TypeError, message)``, where This is a shorthand for ``PyErr_SetString(PyExc_SystemError, message)``,
*message* indicates that an internal operation (e.g. a Python/C API function) where *message* indicates that an internal operation (e.g. a Python/C API
was invoked with an illegal argument. It is mostly for internal use. function) was invoked with an illegal argument. It is mostly for internal
use.
.. cfunction:: int PyErr_WarnEx(PyObject *category, char *message, int stacklevel) .. cfunction:: int PyErr_WarnEx(PyObject *category, char *message, int stacklevel)