def __get__(self, obj, cls=None): if obj is None: return self._get_attribute(cls) if cls is None: cls = type(obj) attribute = self._get_attribute(cls) variable = get_variable(obj, attribute) return variable.get()
def __set__(self, obj, value): cls = type(obj) attribute = self._get_attribute(cls) variable = get_variable(obj, attribute) variable.set(value)