Skip to content

bpo-30935: update get_event_loop docs #2731

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 29, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Doc/library/asyncio-eventloops.rst
Original file line number Diff line number Diff line change
Expand Up @@ -170,12 +170,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*.
Expand Down
2 changes: 1 addition & 1 deletion Doc/whatsnew/3.6.rst
Original file line number Diff line number Diff line change
Expand Up @@ -819,7 +819,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`.)

Expand Down