Если запустить 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
🎬 **Step Back in Time with "Borrowed Wives" (1930): Laughter & Mismatched Marriages!** 🎉
Discover the hilarity of mistaken identities in the pre-Code comedy "Borrowed Wives." This 1930 classic is a must-watch for vintage film lovers! Subscribe now for more timeless gems and exclusive insights! 🌟🍿#ClassicMovies#HiddenGems
https://publicdomainmovies.info/borrowed-wives-1930/
**Unleashing the Secrets of *The Leopard Woman* (1920)!** 🎬✨ Step into the exotic world of jungle espionage and adventure! This silent gem stars the charismatic Louise Glaum as the enigmatic Leopard Woman. A spellbinding tale of love and intrigue awaits! 🐆💋 Subscribe now for more classic movie treasures! 🌟#ClassicCinema#HiddenGems
https://publicdomainmovies.info/leopard-woman-1920/