Replies: 1 comment
-
|
Late reply, but thanks for raising this. Version scope: this code is from current DART main / DART 7 You are right that the current DART helper is effectively a small compatibility layer around nanobind's single-inheritance model. In DART we use it for C++ hierarchies such as I think extracting the idea could be useful, but I would prefer not to publish the current code as-is under a DART-owned PyPI package until the API is made generic and tested outside DART. It also relies on nanobind internals such as That said, the DART code is BSD-2-Clause, and I am fine with you using it as a reference or starting point. If you spin up a separate project, I would be happy to look at it and point out the DART cases it needs to preserve. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I embarked on an adventure to port multiple inheritance support from pybind11 to nanobind via gpt-5.3-codex. I got pretty far, and it occurred to me that probably one could implement this without actually modifying nanobind at all (or at least, in a very limited way).
As I was contemplating
nb_type_get, I started searching for other projects and found your polymorphic type caster implementation and the related MI helpers.... so I guess I was right, one can do that. :)MI is a really common need, so it seems to me that extracting the code into a separate pypi project would be a pretty reasonable thing to do. Are you interested in doing this? If not, I'll probably swipe some of it and do it myself.
Beta Was this translation helpful? Give feedback.
All reactions