Hi all, I have classes wrapped with boost::python defining certain attributes. If user assigns value to an attribute that doesn't exist as class attribute, python automatically creates instance attribute of that name.
I would like to avoid this (although I know that is the way Python is supposed to work), as python classes, in my case, model c++ classes closely: AttributeError should be raised. It happened to me (and other people) that I assigned nonexistent attribute (by typo or by confusing the name in my head), then debugging the c++ code to see why it did not have the effect it should obviously have. I wasn't able to find answer via google, besides overriding __setattr__, which would have most likely have performance implications. I appreciate any pointers or suggestions. Thanks, Václav _______________________________________________ Cplusplus-sig mailing list Cplusplus-sig@python.org http://mail.python.org/mailman/listinfo/cplusplus-sig