docs: Add asyncio source code links (GH-16640)

This commit is contained in:
Kyle Stanley 2019-10-10 19:18:46 -04:00 committed by Yury Selivanov
parent 320dd504dd
commit f900064ac4
11 changed files with 54 additions and 4 deletions

View file

@ -18,9 +18,9 @@ and Tasks.
Coroutines
==========
Coroutines declared with async/await syntax is the preferred way of
writing asyncio applications. For example, the following snippet
of code (requires Python 3.7+) prints "hello", waits 1 second,
:term:`Coroutines <coroutine>` declared with the async/await syntax is the
preferred way of writing asyncio applications. For example, the following
snippet of code (requires Python 3.7+) prints "hello", waits 1 second,
and then prints "world"::
>>> import asyncio
@ -240,6 +240,10 @@ Running an asyncio Program
.. versionchanged:: 3.9
Updated to use :meth:`loop.shutdown_default_executor`.
.. note::
The source code for ``asyncio.run()`` can be found in
:source:`Lib/asyncio/runners.py`.
Creating Tasks
==============