[New-bugs-announce] [issue40526] documentation bad on asyncio

Chris Drake report at bugs.python.org
Wed May 6 00:06:03 EDT 2020


New submission from Chris Drake <cnd at geek.net.au>:

> 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)
    print(what)

async def main():
    print(f"started at {time.strftime('%X')}")
    await say_after(2, 'world')
    await say_after(1, 'hello')
    print(f"finished at {time.strftime('%X')}")

asyncio.run(main())

----------
components: asyncio
messages: 368223
nosy: asvetlov, cnd, yselivanov
priority: normal
severity: normal
status: open
title: documentation bad on asyncio
versions: Python 3.9

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


More information about the New-bugs-announce mailing list