How to return class object and use its methods from Python. How can I cast the C++ object to something whose methods I can use in Python? #5030
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm not sure why I can't find any good discussion of this, I have been searching since yesterday.
How do you return a class object from C++ binding and use its methods in Python i.e.:
I want to then bind B and use it in Python
How do I do this in Pybind, Nanobind or Boost Python (if the syntax for the latter is similar).
I can't use lambdas when creating the
B
binding. The use case is actually more complex than what I've shown here.Beta Was this translation helpful? Give feedback.
All reactions