[New-bugs-announce] [issue34344] Fix the docstring for AbstractEventLoopPolicy.get_event_loop

Vlad Starostin report at bugs.python.org
Mon Aug 6 06:04:47 EDT 2018


New submission from Vlad Starostin <drtyrsa at yandex.ru>:

The docstring says "This may be None or an instance of EventLoop". But docs explicitly state that get_event_loop "must never return None". The same docstring is also in the example in docs: https://docs.python.org/3.6/library/asyncio-eventloops.html#customizing-the-event-loop-policy

I propose changing it to:

def get_event_loop(self):
    """Get the event loop.

    Returns an instance of EventLoop or raises an exception.
    """

If the wording is ok, I'll make a PR.

----------
assignee: docs at python
components: Documentation, asyncio
messages: 323190
nosy: asvetlov, docs at python, drtyrsa, yselivanov
priority: normal
severity: normal
status: open
title: Fix the docstring for AbstractEventLoopPolicy.get_event_loop
versions: Python 3.6, Python 3.7, Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34344>
_______________________________________


More information about the New-bugs-announce mailing list