Если запустить REPL с модулем asyncio, то вы входите в особый асинхронный REPL.
user@host:~$ python -m asyncio
asyncio REPL 3.12.7 ...
Use "await" directly instead of "asyncio.run()".
>>> import asyncio
>>>
В этом режиме
- создаётся и настраивается event loop
- уже импортирован asyncio
- работает await на верхнем уровне
То есть такая команда сработает без ошибок!
await asyncio.sleep(3)
Удобно для тестирования асинхронных функций без создания ивентлупов и остальной обвязки.
Работает в: 3.8+
#tricks#async
India's UPI is taking the world by storm!
With 1 crore+ transactions per hour, 2 lakh+ per minute, and 3500 per second, India leads the real-time payments revolution. Surpassing the US, UK, Germany, and France combined, India holds 46% of all real-time transactions worldwide. UPI is empowering millions like never before.
#8YearsOfDigitalIndia
Honorable Prime Minister #NarendraModi leadership has transformed #DigitalIndia. With a simple click, everything became possible. From digital identities to widespread connectivity, India is scripting a golden chapter of its digital revolution. Check out the video showcasing this remarkable growth.
Visit Now: https://youtu.be/7y2qLEZlOcQ
#8YearsOfDigitalIndia