Get Python type name from C++ type? #5081
Unanswered
Jannik2099
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi
I am trying to look up the Python type that correlates to a C++ type, without having an instance of the C++ type at hand.
So far I have gotten to (simplified)
This works fine for simple registered types, but e.g. for a std::variant<T1, T2> (where T1 and T2 have been registered, ofc) it yields
Union[%, %]
How does pybind resolve these "nested type names" for the docstrings? Is it part of the public API?
Beta Was this translation helpful? Give feedback.
All reactions