def repr(self): method = self.custom_interface.lookup_method(u"+repr") if method is None: return Object.repr(self) else: result = method.call([self]) assert isinstance(result, space.String) return result.string
def repr(self): custom_interface = jit.promote(self.custom_interface) method = custom_interface.lookup_method(u"+repr") if method is None: return Object.repr(self) else: result = method.call([self]) return space.cast(result, space.String, u"+repr cast").string
def repr(self): try: method = self.custom_interface.methods[u"+repr"] except KeyError as error: return Object.repr(self) else: result = method.call([self]) assert isinstance(result, space.String) return result.string