pub fn to_py_error(err: CoreError) -> PyErrExpand description
Maps a CoreError onto the matching Python exception.
I/O failures become IOError; everything else becomes ValueError,
preserving the exception types the bindings raised before the migration.
(A From<CoreError> for PyErr impl is not possible here because of the
orphan rule, so binding methods use this with map_err.)
§引数
err- The core error to convert.
§戻り値
The equivalent Python exception.