mirror of
https://github.com/python/cpython.git
synced 2024-11-26 11:24:40 +08:00
Clarify that AsyncExitStack works with coroutine functions (GH-9405)
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.)
This commit is contained in:
parent
79d1c2e6c9
commit
a3c88ef12c
@ -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()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user