Overriding virtual functions of abstract class in Python #848
Unanswered
huangweiwu
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Can you not declare the constructor in |
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
-
In the example of Overriding virtual functions in Python in the nanobind document.
What if class Dog is an abstract class? Dog Can't be binded directly since it has no construtor. We need to declare a Wrapper class like DogWrapper first.
In this case, my_ext.alarm will raise an type error that dog can't be converted to class Dog. How can I solve this problem?
The implicitly_convertible can't solve this problem.
Beta Was this translation helpful? Give feedback.
All reactions