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))
def setattr(self, index, value): raise space.unwind(space.LAttributeError(self, index))
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))