This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients asvetlov, docs@python, hniksic, miss-islington, rhettinger, vstinner, yselivanov
Date 2019-09-16.08:15:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1568621720.34.0.940988162953.issue38178@roundup.psfhosted.org>
In-reply-to
Content
> In modern asyncio code the explicit loop arguments are no longer used since the loop can always be obtained with get_running_loop().

Yeah, the trend changed. Around Python 3.4, passing explicitly loop was preferred for best performances.

Since that time, the code to get the current loop has been optimized, and the new trend is to make the loop implicit to make the code more readable.

--

When I wrote the doc, self.loop.stop() was called explicitly:

https://docs.python.org/3.5/library/asyncio-protocol.html#tcp-echo-client-protocol

It seems like the example has been modified to add a new "on_con_lost" Future.

--

Anyway, thanks Hrvoje Nikšić for your contribution ;-)
History
Date User Action Args
2019-09-16 08:15:20vstinnersetrecipients: + vstinner, rhettinger, hniksic, asvetlov, docs@python, yselivanov, miss-islington
2019-09-16 08:15:20vstinnersetmessageid: <1568621720.34.0.940988162953.issue38178@roundup.psfhosted.org>
2019-09-16 08:15:20vstinnerlinkissue38178 messages
2019-09-16 08:15:20vstinnercreate