def __setattr__(self, name, value): if name.startswith('_nr_'): name = name.replace('_nr_', '_self_', 1) setattr(self, name, value) else: _ObjectProxy.__setattr__(self, name, value)
def __getattr__(self, name): if name.startswith('_nr_'): name = name.replace('_nr_', '_self_', 1) return getattr(self, name) else: return _ObjectProxy.__getattr__(self, name)