pub fn to_pytype_err(e: impl Display) -> PyErr
Converts any type that implements Display to a Python TypeError.
Display
TypeError
Returns a Python error with the error string.