Пример #1
0
 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()
Пример #2
0
 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()
Пример #3
0
 def __set__(self, obj, value):
     cls = type(obj)
     attribute = self._get_attribute(cls)
     variable = get_variable(obj, attribute)
     variable.set(value)
Пример #4
0
 def __set__(self, obj, value):
     cls = type(obj)
     attribute = self._get_attribute(cls)
     variable = get_variable(obj, attribute)
     variable.set(value)