[docs] [issue38178] Remove explicit "loop" argument from EchoClientProtocol example

Hrvoje Nikšić report at bugs.python.org
Sun Sep 15 11:17:34 EDT 2019


New submission from Hrvoje Nikšić <hniksic at gmail.com>:

The EchoClientProtocol example receives a "loop" argument, which is not used at all in the TCP example, and is used to create a future in the UDP example. In modern asyncio code the explicit loop arguments are no longer used since the loop can always be obtained with get_running_loop().

The proposed patch makes the UDP example consistent with the TCP one (by having the constructor accept the on_con_lost future) and removes the loop argument from both.

----------
assignee: docs at python
components: Documentation, asyncio
messages: 352478
nosy: asvetlov, docs at python, hniksic, yselivanov
priority: normal
severity: normal
status: open
title: Remove explicit "loop" argument from EchoClientProtocol example
versions: Python 3.7, Python 3.8, Python 3.9

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


More information about the docs mailing list