示例#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)