示例#1
0
文件: interface.py 项目: gordol/lever
 def getattr(self, index):
     method = self.__class__.interface.lookup_method(index)
     if method is not None:
         return BoundMethod(self, index, method)
     else:
         raise space.unwind(space.LAttributeError(self, index))
示例#2
0
文件: interface.py 项目: gordol/lever
 def setattr(self, index, value):
     raise space.unwind(space.LAttributeError(self, index))
示例#3
0
 def getattr(self, index):
     try:
         return BoundMethod(self, index,
                            self.__class__.interface.methods[index])
     except KeyError as e:
         raise space.unwind(space.LAttributeError(self, index))