Skip to content

Commit 51bf38f

Browse files
bpo-30935: update get_event_loop docs (GH-2731)
(cherry picked from commit e55de2d) Co-authored-by: Mandeep Singh <[email protected]>
1 parent 6aacc16 commit 51bf38f

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
@@ -169,12 +169,15 @@ An event loop policy must implement the following interface:
169169
Get the event loop for the current context.
170170

171171
Returns an event loop object implementing the :class:`AbstractEventLoop`
172-
interface.
172+
interface. In case called from coroutine, it returns the currently
173+
running event loop.
173174

174175
Raises an exception in case no event loop has been set for the current
175176
context and the current policy does not specify to create one. It must
176177
never return ``None``.
177178

179+
.. versionchanged:: 3.6
180+
178181
.. method:: set_event_loop(loop)
179182

180183
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
@@ -818,7 +818,7 @@ Notable changes in the :mod:`asyncio` module since Python 3.5.0
818818
(all backported to 3.5.x due to the provisional status):
819819

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

0 commit comments

Comments
 (0)