bpo-30935: update get_event_loop docs (GH-2731) · python/cpython@e55de2d

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*.