If it's for the REPL, it's already there, you simply need to start the async REPL.
$ python -m asyncio asyncio REPL 3.8.5 | packaged by conda-forge | (default, Sep 16 2020, 17:43:11) [Clang 10.0.1 ] on darwin Use "await" directly instead of "asyncio.run()". Type "help", "copyright", "credits" or "license" for more information. >>> import asyncio >>> await asyncio.sleep(1) >>> compile and exec have a mode to allow top-level async as well if you want it programmatically, then you can `await` your code object. -- Ma On Sat, 6 Feb 2021 at 07:43, Guido van Rossum <[email protected]> wrote: > > The proposal is to add a default event loop that is always active. > > On Sat, Feb 6, 2021 at 06:41 <[email protected]> wrote: >> >> I mean to be able to do something like this: >> ```python >> import asyncio >> >> await asyncio.sleep(1); >> ``` > > >> > -- > --Guido (mobile) > _______________________________________________ > Python-ideas mailing list -- [email protected] > To unsubscribe send an email to [email protected] > https://mail.python.org/mailman3/lists/python-ideas.python.org/ > Message archived at > https://mail.python.org/archives/list/[email protected]/message/ATXEJR7GYY2E3B6WGC7Y2G7NL6WWZ33L/ > Code of Conduct: http://python.org/psf/codeofconduct/ _______________________________________________ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/HWO5WJJ5HAOQC7DBLOBRE3VBRXPZL2GG/ Code of Conduct: http://python.org/psf/codeofconduct/
