Every programming language has strengths and weaknesses. Python offers many convenient programming conventions but is computationally slow. Rust gives you machine-level speed and strong memory safety ...
As well as passing exceptions raised by other functions back to the Python system, you can also quite easily raise exceptions directly using; void PyErr_SetString(PyObject *type, const char *message) ...
As the chain of functions could fail for a wide range of reasons the cause of the exception is signaled by passing an exception object which has properties that define the exception back up the ...