Exemplo n.º 1
0
 def setattr(self, attr, value):
     """
     Find the attribute referred to by 'attr', and set it to 'value'.
     """
     pos = attr.rfind('.')
     if pos > -1:
         path = attr[:pos]
         attr = attr[pos+1:]
         obj = traverse(self, path)
     else:
         obj = self
     return setattr(obj, attr, value)
Exemplo n.º 2
0
 def setattr(self, attr, value):
     """
     Find the attribute referred to by 'attr', and set it to 'value'.
     """
     pos = attr.rfind('.')
     if pos > -1:
         path = attr[:pos]
         attr = attr[pos + 1:]
         obj = traverse(self, path)
     else:
         obj = self
     return setattr(obj, attr, value)
Exemplo n.º 3
0
 def __call__(self, *args, **kwargs):
     return traverse (self.other, self.path)(*args, **kwargs)
Exemplo n.º 4
0
 def __call__(self, *args, **kwargs):
     return traverse(self.other, self.path)(*args, **kwargs)
Exemplo n.º 5
0
 def getattr(self, attr):
     """
     Find the attribute referred to by 'attr', and return it.
     """
     return traverse(self, attr)
Exemplo n.º 6
0
 def proxied(self):
     return traverse(self.other, self.path)
Exemplo n.º 7
0
 def getattr(self, attr):
     """
     Find the attribute referred to by 'attr', and return it.
     """
     return traverse(self, attr)
Exemplo n.º 8
0
 def proxied(self):
     return traverse (self.other, self.path)