Include/internal/pycore_object

Source   Edit  

Procs

proc Py_CheckSlotResult(obj: PyObject; slot_name: cstring; res: PyObject): bool {.
    cdecl, ...raises: [], tags: [WriteIOEffect], forbids: [].}

equal to things like

assert Py_CheckSlotResult(obj, "__getitem__", result)

Source   Edit  
proc Py_CheckSlotResult(obj: PyObject; slot_name: cstring; success: bool;
                        res: PyObject): bool {.cdecl, ...raises: [],
    tags: [WriteIOEffect], forbids: [].}
_Py_CheckSlotResult
Hint: CPython Py_FatalError if (res.isNil and not PyErr_Occurred) or (not res.isNil and PyErr_Occurred) but in NPython we use res to store exception when PyErr_Occurred, so this function simply (and only can) fatal if res.isNil
Source   Edit