Discussion:
[Python-checkins] cpython (3.4): asyncio doc: more explicit doc for async()
victor.stinner
2014-10-12 22:10:11 UTC
Permalink
https://hg.python.org/cpython/rev/1a0895ffb1fa
changeset: 93012:1a0895ffb1fa
branch: 3.4
user: Victor Stinner <victor.stinner at gmail.com>
date: Sun Oct 12 21:36:17 2014 +0200
summary:
asyncio doc: more explicit doc for async()

The function schedules the execution of coroutines, it's not just a wrapper for
something.

files:
Doc/library/asyncio-task.rst | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)


diff --git a/Doc/library/asyncio-task.rst b/Doc/library/asyncio-task.rst
--- a/Doc/library/asyncio-task.rst
+++ b/Doc/library/asyncio-task.rst
@@ -478,7 +478,8 @@

.. function:: async(coro_or_future, \*, loop=None)

- Wrap a :ref:`coroutine object <coroutine>` in a future.
+ Schedule the execution of a :ref:`coroutine object <coroutine>`: wrap it in
+ a future. Return a :class:`Task` object.

If the argument is a :class:`Future`, it is returned directly.
--
Repository URL: https://hg.python.org/cpython
Loading...