[New-bugs-announce] [issue45625] Add support for top-level await
Fred
report at bugs.python.org
Wed Oct 27 07:38:05 EDT 2021
New submission from Fred <eldmannen at gmail.com>:
I want top-level await without any boilerplate code or setup.
Just write a "await" statement on line 1 without any indention.
#!/usr/bin/env python3
import asyncio
await asyncio.sleep(1)
I don't want to have to call asyncio.run(main()), and I don't want to have to put the await inside an async function.
----------
components: Interpreter Core
messages: 405088
nosy: Fred
priority: normal
severity: normal
status: open
title: Add support for top-level await
type: enhancement
versions: Python 3.11
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45625>
_______________________________________
More information about the New-bugs-announce
mailing list