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

Reply via email to