[issue40526] documentation bad on asyncio

2020-05-06 Thread Yury Selivanov
Yury Selivanov added the comment: > If so, the main purpose of that example is just to demonstrate basic > async/await syntax, and show asyncio.run() for a trivial case to clearly show > how it's used at a fundamental level; it's intentional that the more involved > examples that

[issue40526] documentation bad on asyncio

2020-05-05 Thread Kyle Stanley
Kyle Stanley added the comment: I presume this is referring to the following example on the first page of the docs: ``` import asyncio async def main(): print('Hello ...') await asyncio.sleep(1) print('... World!') # Python 3.7+ asyncio.run(main()) ``` If so, the main purpose

[issue40526] documentation bad on asyncio

2020-05-05 Thread Chris Drake
New submission from Chris Drake : > The sample on this page is not demonstrating anything asynchronous: > https://docs.python.org/3/library/asyncio.html Put something that is relevant please. e.g. import asyncio import time async def say_after(delay, what): await asyncio.sleep(delay)