How can I specify overloads for a setter for a def_prop_rw
?
#1063
Unanswered
bethebunny
asked this question in
Q&A
Replies: 1 comment
-
You could bind a |
Beta Was this translation helpful? Give feedback.
0 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.
-
In some cases my C++ types have multiple setters that support different input types, and I'm binding these in Python as properties. How can I supply an overload set as my setter? Is there an easy way that shows the overloads in stubs correctly, or would I need to build the function + signature myself as a lambda that internally uses
nb::try_cast
etc?Beta Was this translation helpful? Give feedback.
All reactions