-
Before 0.23 I could write: Why so complicated now? This is not an improvement for Rust developers to write much more code. In addition into_pyobject comes with new problems. Like: true.into_pyobject(py).as_deref().unwrap().unbind().into_any() Produces an error that PyBool cannot be moved. So I don't know how to solve this. But the old implementation true.into_py(py) works like a charm. Maybe some can help me with this issue? Best regards, Martin |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Found a (better) solution: Using into_py_any(py).unwrap() solves the issue and makes it nearly as easy as before. |
Beta Was this translation helpful? Give feedback.
-
This is a very reasonable question. We had a number of pain points with Rather than As with the Yes, the fact that all to-Python conversions now return results adds complexity which we haven't yet got a perfect answer for. Rust edition 2024 is expected to stabilise the |
Beta Was this translation helpful? Give feedback.
Found a (better) solution:
Using into_py_any(py).unwrap() solves the issue and makes it nearly as easy as before.