New submission from Vlad Starostin <drty...@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@python
components: Documentation, asyncio
messages: 323190
nosy: asvetlov, docs@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 <rep...@bugs.python.org>
<https://bugs.python.org/issue34344>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to