From 58774101c4492e00513bf36b9f99841c14a700a2 Mon Sep 17 00:00:00 2001 From: manoj Date: Tue, 14 Apr 2026 19:17:10 +0530 Subject: [PATCH] Document the loop argument in ensure_future() method --- Doc/library/asyncio-future.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Doc/library/asyncio-future.rst b/Doc/library/asyncio-future.rst index 43977de273e61f..b067235b72adc7 100644 --- a/Doc/library/asyncio-future.rst +++ b/Doc/library/asyncio-future.rst @@ -47,7 +47,10 @@ Future Functions * a :class:`Task` object that would await on *obj*, if *obj* is an awaitable (:func:`inspect.isawaitable` is used for the test.) - If *obj* is neither of the above a :exc:`TypeError` is raised. + If *obj* is neither of the above a :exc:`TypeError` is raised. The + optional *loop* argument takes an object of :class:`EventLoop` to + denote which event loop *obj* belongs to. By default *loop* is set + to currently running event loop. .. important::