]> granicus.if.org Git - python/commitdiff
Update asyncio.ensure_future() documentation (GH-15347)
authorRoger Iyengar <ri@rogeriyengar.com>
Wed, 21 Aug 2019 15:59:11 +0000 (11:59 -0400)
committerYury Selivanov <yury@magic.io>
Wed, 21 Aug 2019 15:59:11 +0000 (11:59 -0400)
Added back mention that ensure_future actually scheduled obj. This documentation just mentions what ensure_future returns, so I did not realize that ensure_future also schedules obj.

Doc/library/asyncio-future.rst

index 6e6e0137c1bdda4de224a63dc6a7c27fda4b4a34..c069471b519be95f385e167fa3bc7a31499c0466 100644 (file)
@@ -35,7 +35,9 @@ Future Functions
      is used for the test.)
 
    * a :class:`Task` object wrapping *obj*, if *obj* is a
-     coroutine (:func:`iscoroutine` is used for the test.)
+     coroutine (:func:`iscoroutine` is used for the test);
+     in this case the coroutine will be scheduled by
+     ``ensure_future()``.
 
    * a :class:`Task` object that would await on *obj*, if *obj* is an
      awaitable (:func:`inspect.isawaitable` is used for the test.)