Если запустить 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
🌍🌍✨✨✨✨#tv
🔴Yangiliklar
🇺🇿Oltiariq tumanida 🌱“Yashil makon” loyihasi doirasida Tuman Madaniyat boʻlimi xodimlari ishtirokida ko‘chat ekish ishlari amalga oshirildi.
Rasmiy sahifalarimizda bizni kuzatib boring:👇
📱Telegram | 📱Instagram |
📱Facebook | 📱YouTube
📺Smart TV Owners Want Multi-Device Viewing Options
Smart TV Owners watch a combination of both broadcast and online #TV. Further exploring their diverse TV engagement habits shows they frequently ventures beyond their smart TVs, watching their favorite TV shows and films across a broad range of devices, demonstrating that it’s the content, not the device, that governs preferences.
🚀@PerspectiveIX
🌀 http://prs.pctvix.co/TelegramIX