From 414d58f7450f04a12676aefbc650599930aeaca9 Mon Sep 17 00:00:00 2001 From: "Miss Islington (bot)" <31488909+miss-islington@users.noreply.github.com> Date: Fri, 5 Oct 2018 19:29:17 -0700 Subject: [PATCH] Clarify that AsyncExitStack works with coroutine functions (GH-9405) (GH-9408) The docs were ambiguous about whether you pass in a coroutine function or a coroutine object, e.g. is it: aestack.push_async_exit(some_async_func) or aestack.push_async_exit(some_async_func()) (It's the first one.) (cherry picked from commit a3c88ef12c7b8993912750b56a1e095652fe47c0) Co-authored-by: Nathaniel J. Smith --- Doc/library/contextlib.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/library/contextlib.rst b/Doc/library/contextlib.rst index 7dc5b2989f9c..930c97358e08 100644 --- a/Doc/library/contextlib.rst +++ b/Doc/library/contextlib.rst @@ -471,11 +471,11 @@ Functions and classes provided: .. method:: push_async_exit(exit) Similar to :meth:`push` but expects either an asynchronous context manager - or a coroutine. + or a coroutine function. .. method:: push_async_callback(callback, *args, **kwds) - Similar to :meth:`callback` but expects a coroutine. + Similar to :meth:`callback` but expects a coroutine function. .. method:: aclose() -- 2.47.3