Get or clear the last Python error encountered

py_last_error()

py_clear_last_error()

Value

For py_last_error(), a list with the type, value, and traceback for the last Python error encountered (can be NULL if no error has yet been encountered).