def __setattribute__(self, attr, value): attr = as_cstring(attr) check(lib.setfield(self.ptr, attr, value.ptr))
def __getattr__(self, attr): attr = as_cstring(attr) return wrap(lib.getfield(self.ptr, attr))