(cls, attempt_number: int, value: t.Any, has_exception: bool)
return fut
Construct a new Future object.
Construct a new Future object.
Construct a new Future object .
def construct(cls, attempt_number: int, value: t.Any, has_exception: bool) -> "Future":
        """Construct a new Future object."""
        fut = cls(attempt_number)
        if has_exception:
            fut.set_exception(value)
        else:
            fut.set_result(value)
        return fut
def construct ( cls , attempt_number : int , value : t . Any , has_exception : bool ) -> "Future" : fut = cls ( attempt_number ) if has_exception : fut . set_exception ( value ) else : fut . set_result ( value ) return fut