You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As the title says, how do I add a description for a function parameter without giving that parameter a default value?
To name an argument, I can use either pybind11::arg or pybind11::arg_v. The constructor for pybind11::arg only takes a const char* name argument. Whereas the pybind11::arg_v constructor takes const char* name, T&& x, const char* descr. There is no constructor that can take const char* name, const char* descr without also providing a default argument. Is there a value that I can pass that signals there is no default value given?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
As the title says, how do I add a description for a function parameter without giving that parameter a default value?
To name an argument, I can use either
pybind11::arg
orpybind11::arg_v
. The constructor forpybind11::arg
only takes aconst char* name
argument. Whereas thepybind11::arg_v
constructor takesconst char* name, T&& x, const char* descr
. There is no constructor that can takeconst char* name, const char* descr
without also providing a default argument. Is there a value that I can pass that signals there is no default value given?Beta Was this translation helpful? Give feedback.
All reactions