pub fn error_to_pyerr(err: Error) -> PyErrExpand description
Convert a crate Error into a PyErr suitable for returning across
the PyO3 boundary. Performs structural downcasting so e.g.
SyntaxError becomes PySyntaxError and UnsupportedFeature becomes
PyNotImplementedError.