This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Fred
Recipients Fred
Date 2021-10-27.11:38:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1635334685.92.0.999778106074.issue45625@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2021-10-27 11:38:05Fredsetrecipients: + Fred
2021-10-27 11:38:05Fredsetmessageid: <1635334685.92.0.999778106074.issue45625@roundup.psfhosted.org>
2021-10-27 11:38:05Fredlinkissue45625 messages
2021-10-27 11:38:05Fredcreate