Kaydet (Commit) 414d58f7 authored tarafından Miss Islington (bot)'s avatar Miss Islington (bot) Kaydeden (comit) Ned Deily

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 a3c88ef1)
Co-authored-by: 's avatarNathaniel J. Smith <njs@pobox.com>
üst 28dd737c
......@@ -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()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment