Skip to content

Commit e55de2d

Browse files
daxlab1st1
authored andcommitted
bpo-30935: update get_event_loop docs (GH-2731)
1 parent 4fadf0c commit e55de2d

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

Doc/library/asyncio-eventloops.rst

+4-1
Original file line numberDiff line numberDiff line change
@@ -176,12 +176,15 @@ An event loop policy must implement the following interface:
176176
Get the event loop for the current context.
177177

178178
Returns an event loop object implementing the :class:`AbstractEventLoop`
179-
interface.
179+
interface. In case called from coroutine, it returns the currently
180+
running event loop.
180181

181182
Raises an exception in case no event loop has been set for the current
182183
context and the current policy does not specify to create one. It must
183184
never return ``None``.
184185

186+
.. versionchanged:: 3.6
187+
185188
.. method:: set_event_loop(loop)
186189

187190
Set the event loop for the current context to *loop*.

Doc/whatsnew/3.6.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -819,7 +819,7 @@ Notable changes in the :mod:`asyncio` module since Python 3.5.0
819819
(all backported to 3.5.x due to the provisional status):
820820

821821
* The :func:`~asyncio.get_event_loop` function has been changed to
822-
always return the currently running loop when called from couroutines
822+
always return the currently running loop when called from coroutines
823823
and callbacks.
824824
(Contributed by Yury Selivanov in :issue:`28613`.)
825825

0 commit comments

Comments
 (0)