Replies: 2 comments 5 replies
-
Of course, after an hour of searching, I find the solution immediately after posting. For future reference, this works:
Now, I just need to find how to do the same for |
Beta Was this translation helpful? Give feedback.
0 replies
-
fn foo(py: Python) -> PyObject {
PyClassInitializer::from(BaseClass {…})
.add_subclass(SubClass {…})
.into_py(py)
} Fails on
|
Beta Was this translation helpful? Give feedback.
5 replies
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.
-
Hello! First, thanks for the amazing work, this library is impressive.
I currently have something similar to this:
Which is exposed to Python as sub-classes:
I'm omitting the
impl
blocks (no issues with them, following the documentation).I'd like to be able to declare
#[pymethods]
that takeOutside
s as parameters, or that return them.Therefore, I'm trying to implement
FromPyObject
, etc, forOutside
.However, I'm stuck with trying to implement them:
Is there another method similar to
extract
that would also give a reference to the parent class? Or is there any other way to access the parent class from the child?Beta Was this translation helpful? Give feedback.
All reactions