From da248fc9c80170aa15684db8a47904633386e212 Mon Sep 17 00:00:00 2001 From: Andrew Svetlov Date: Fri, 1 Apr 2022 01:05:22 +0300 Subject: [PATCH] Document the method --- Doc/library/asyncio-extending.rst | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/Doc/library/asyncio-extending.rst b/Doc/library/asyncio-extending.rst index 619723e61b5f9e..215d215bb14fe7 100644 --- a/Doc/library/asyncio-extending.rst +++ b/Doc/library/asyncio-extending.rst @@ -48,16 +48,27 @@ For this purpose the following, *private* constructors are listed: .. method:: Future.__init__(*, loop=None) -Create a built-in future instance. + Create a built-in future instance. -*loop* is an optional event loop instance. + *loop* is an optional event loop instance. .. method:: Task.__init__(coro, *, loop=None, name=None, context=None) -Create a built-in task instance. + Create a built-in task instance. -*loop* is an optional event loop instance. The rest of arguments are described in -:meth:`loop.create_task` description. + *loop* is an optional event loop instance. The rest of arguments are described in + :meth:`loop.create_task` description. + + .. versionchanged:: 3.11 + + *context* argument is added. + +.. method:: Tasl._check_future(future) + + Return ``True`` if *future* is attached to the same loop as the task, ``False`` + otherwise. + + .. versionadded:: 3.11 Task lifetime support