]> granicus.if.org Git - python/commitdiff
bpo-30935: update get_event_loop docs (GH-2731)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 29 May 2018 19:33:29 +0000 (12:33 -0700)
committerGitHub <noreply@github.com>
Tue, 29 May 2018 19:33:29 +0000 (12:33 -0700)
(cherry picked from commit e55de2d77f10d524be0b426e587fbc820f76de71)

Co-authored-by: Mandeep Singh <daxlab@users.noreply.github.com>
Doc/library/asyncio-eventloops.rst
Doc/whatsnew/3.6.rst

index 7970e9039dfd86b8f785d39e20b110603f35dd41..3aa9ffeff268c429473b018f4e5163a8a4ebbdfb 100644 (file)
@@ -169,12 +169,15 @@ An event loop policy must implement the following interface:
       Get the event loop for the current context.
 
       Returns an event loop object implementing the :class:`AbstractEventLoop`
-      interface.
+      interface. In case called from coroutine, it returns the currently
+      running event loop.
 
       Raises an exception in case no event loop has been set for the current
       context and the current policy does not specify to create one. It must
       never return ``None``.
 
+      .. versionchanged:: 3.6
+
    .. method:: set_event_loop(loop)
 
       Set the event loop for the current context to *loop*.
index 88146dc7bcb85d25abc9e379099bb3a4a6d1dc93..c5ccd85603c031f7596a3167e0060a775386e193 100644 (file)
@@ -818,7 +818,7 @@ Notable changes in the :mod:`asyncio` module since Python 3.5.0
 (all backported to 3.5.x due to the provisional status):
 
 * The :func:`~asyncio.get_event_loop` function has been changed to
-  always return the currently running loop when called from couroutines
+  always return the currently running loop when called from coroutines
   and callbacks.
   (Contributed by Yury Selivanov in :issue:`28613`.)