Replies: 1 comment
-
You could import the base module with |
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
-
I'm considering changing the layout of my project as advised in the docs:
https://nanobind.readthedocs.io/en/latest/packaging.html#step-1-overview
Currently, my module is a shared library, no directories and no python files.
The proposed layout has advantages, but if I adopt it and do:
then this:
becomes this:
I could add
def("__repr__")
for each class, but that would be a lot of low-value functions.Doing
my_ext.Dog.__module__ = 'my_ext'
also seems to work, although I'm not sure if it's a good idea.Or I could just live with the ugly repr's.
Does anyone have a better solution?
Beta Was this translation helpful? Give feedback.
All reactions