Skip to content

Commit 3d3f582

Browse files
author
benjamin.peterson
committed
PyErr_BadInternalCall() raises a SystemError, not TypeError #5112
git-svn-id: http://svn.python.org/projects/python/trunk@69140 6015fed2-1504-0410-9fe1-9d1591cc4771
1 parent ad40d05 commit 3d3f582

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Doc/c-api/exceptions.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -282,9 +282,10 @@ is a separate error indicator for each thread.
282282

283283
.. cfunction:: void PyErr_BadInternalCall()
284284

285-
This is a shorthand for ``PyErr_SetString(PyExc_TypeError, message)``, where
286-
*message* indicates that an internal operation (e.g. a Python/C API function)
287-
was invoked with an illegal argument. It is mostly for internal use.
285+
This is a shorthand for ``PyErr_SetString(PyExc_SystemError, message)``,
286+
where *message* indicates that an internal operation (e.g. a Python/C API
287+
function) was invoked with an illegal argument. It is mostly for internal
288+
use.
288289

289290

290291
.. cfunction:: int PyErr_WarnEx(PyObject *category, char *message, int stacklevel)

0 commit comments

Comments
 (0)