How do you return a PyObject in 0.25? #5346
Replies: 1 comment 1 reply
-
Nevermind. I just deleted a bunch of code and rewrote it and now it's happy with |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
It's been sometime since I wrote things in pyo3 and the API has changed a fair amount.
I used to be able to define a function that received an arbitrary PyObject and returned a PyObject:
or if I wanted to wrap in a result:
This is apparently not longer valid. I can receive a generic
PyObject
as an argument, but the return type is making the compiler grumpy telling me:Pretty shocking that
PyObject
cannot turn into itself? :pWhat's the new way to do this?
Beta Was this translation helpful? Give feedback.
All reactions