-
Notifications
You must be signed in to change notification settings - Fork 899
Closed as not planned
Description
I have the following:
pub fn apply_local_change(&mut self, change: &PyAny) -> PyResult<(Py<PyAny>, PyBytes)> {
// function implementation ...
let bytes = *PyBytes::new(py, change.raw_bytes());
Ok((pythonize(py, &patch)?, bytes))
}However, I get an error saying "the trait IntoPyCallbackOutput<_> is not implemented for Result<(pyo3::Py<PyAny>, PyBytes), PyErr>". Is there any reason this trait would not be implemented for PyBytes?
I can solve the problem by returning a Vec<u8>, but that seems less Pythonic.
Update: This seems to apply for all Py... types, i.e, I can't return a Pylist either.