New submission from Chris Drake <c...@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 <rep...@bugs.python.org>
<https://bugs.python.org/issue40526>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to