Если запустить 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
The moment you all have been waiting for! ⌛️
Welcome the Warriors for India ka Tyohaar! 🔥
Fasten your seat belts for a crazy #IPL journey with #Vision11 & #CSK
🤜🤛
Ab aayega maza!
Download #Vision11 now!
https://vision11.in/APK/vision11.apk
Kursi ki peti baandh lijiye mausam bigadne wala hai, Fantasy Apps ka Pathaan is here!
Download the #Vision11 App & make your team now.
#IskiJhalakSabseAlag#Vision11#Csk#Pathaan
🚨 GRAND WINNINGS ALERT 🚨
Play the MEGA GL of the Indian T20 League #CSK vs Gujarat and take home ₹ 1 CRORE!! 💸💸💸
₹5 LAKHS ka FREE giveaway bhi hai, toh socho mat bas contests join karo aur jeeto on #Vision11!! 💪💪
Download #Vision11 now! 📲#IskiJhalakSabseAlag
https://vision11.in/APK/vision11.apk
#vision11#sapnokavision#vision11official#iskijhalaksabsealag
Nahi rokte to Guinness World Record bana deta Ben😂!
Download the #Vision11 App and Make your team now.
Ben ko captain banao kya pata Ben aapka bhi naam lele🤭!
#IskiJhalakSabseAlag#BenStokes#Csk#Vision11#BestFantasyApp