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