API Reference / Classes / asyncio / Future Future Standard library class asyncio.Future View source class Future class Future[R](object) Fields 1 R type Constructors 1 __init__ __init__(self: Self, /, *, loop: Optional[EventLoop] = None) Added by asyncio Methods 9 add_done_callback add_done_callback(self: Self, callback, /) Added by asyncio result result(self: Self, /) -> R Added by asyncio set_result set_result(self: Self, result: R, /) Added by asyncio set_exception set_exception(self: Self, exception: BaseException, /) Added by asyncio cancelled cancelled(self: Self, /) Added by asyncio done done(self: Self, /) Added by asyncio cancel cancel(self: Self, /, msg: Optional[str] = None) Added by asyncio get_loop get_loop(self: Self, /) Added by asyncio exception exception(self: Self, /) -> Optional[BaseException] Added by asyncio Special methods 1 __await__ @async __await__(self: Self, /) Added by asyncio
class Future class Future[R](object) Fields 1 R type Constructors 1 __init__ __init__(self: Self, /, *, loop: Optional[EventLoop] = None) Added by asyncio Methods 9 add_done_callback add_done_callback(self: Self, callback, /) Added by asyncio result result(self: Self, /) -> R Added by asyncio set_result set_result(self: Self, result: R, /) Added by asyncio set_exception set_exception(self: Self, exception: BaseException, /) Added by asyncio cancelled cancelled(self: Self, /) Added by asyncio done done(self: Self, /) Added by asyncio cancel cancel(self: Self, /, msg: Optional[str] = None) Added by asyncio get_loop get_loop(self: Self, /) Added by asyncio exception exception(self: Self, /) -> Optional[BaseException] Added by asyncio Special methods 1 __await__ @async __await__(self: Self, /) Added by asyncio