| ▲ | kvemkon 3 days ago | |
> Before P2996, generating Python bindings required either: I'm missing nanobind here. > Method lookup. Python sees a.dot and searches for the dot attribute. It checks a.__dict__, > Each attribute access (self.x) involves:
Since C++ classes are fixed, I'd expect attributes to be declared once in python (slots).One thing yet important for cross-language projects: callbacks (events). Would be nice if the sample could be extended. | ||
| ▲ | fthiesen 3 days ago | parent [-] | |
Thanks for the suggestion, let me take a good look at callbacks. Another thing that I can't make work elegantly is compiling template functions from C++, since we have no clue to guess which types will be instantiated in the Python code (and they can even depend on user input, so only determined at runtime) | ||