[issue45625] Add support for top-level await

Fred report at bugs.python.org
Tue Nov 2 05:55:43 EDT 2021


Fred <eldmannen at gmail.com> added the comment:

I don't care what async framework is used, nor do I care if its a x86 or ARM, or if its Windows or Linux.

I don't want to have to setup an async runner because it is boilerplate code, and it brings concern into my application which is outside of the domain of my application.

In JavaScript, I can just call await fetch() or any other asynchronous function without having to pick and configure a async runtime.

On .NET it is also very easy, just await a function at the top-level without declare any runtime either. 
https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/tutorials/top-level-statements

Python is suppose to be a high-level language. Programmers should focus on their domain, not underlying things such as which runtime to use, which garbage collector to use, etc.

----------

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


More information about the Python-bugs-list mailing list