dynamic type description
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 18k
- Forks
- 2.3k
- Avg merge
- 5d 17h
- Merged PRs (30d)
- 10
Description
In the context of DDS I have a set of types described in an IDL. These types have corresponding implementations in both, C++ and python and there is a generic type conversion mechanism based on serialization and deserialization in both languages (and exchange of the serialized buffer between C++ and python).
While I have the type conversion running , I'm puzzled how to pass a nicely formatted type name to PYBIND11_TYPE_CASTER. As far as I can see, the macro expects a pybind11::detail::descr and I was able to pass _<T>(). However, this produces the C++ type name, while I have a function to "compute" the corresponding python type name. Is there a possibility to pass a name that is not a constexpr?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the PYBIND11_TYPE_CASTER macro and pybind11::detail::descr usage, then compare them with the existing C++ and Python serialization and deserialization conversion mechanism. Determine whether a dynamically computed Python type name can be represented, and define the expected behavior for generated type descriptions before proposing a change.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, python
- Domain
- developer-experience
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100