> 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:
Dictionary lookup in self.__dict__
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.