Если запустить 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
🚨🔫WHCD SHOOTER PLANNED TO TARGET TRUMP OFFICIALS
🔹 Cole Allen, 31, rushed security with shotgun, handgun, and knives at Washington Hilton 🔪
🔹 California teacher wrote "Administration officials are targets" minutes before attack 📝
🔹 Traveled by train from LA to DC, checked into hotel days before correspondents' dinner 🚂
Allen apologized to family but called it his "duty" to target high-ranking officials — except FBI Director Kash Patel 🎯⚖️
Security nightmare: How did he get so close to the President? 😰🛡️
📊 The numbers don't lie. Stay tuned for updates 📱
🌍 This affects more people than you think 📲
#WHCD#Security
@america
🎩🚨MENTALIST RECALLS "ARE WE ABOUT TO DIE?" MOMENT BESIDE TRUMP
🔹 Oz Pearlman was mid-magic trick guessing press secretary's baby name when gunshots erupted at 8:36pm 🍼✨
🔹 Secret Service tackled both performer and president to ground — "his eyes weren't registering," Pearlman says 👁️😰
🔹 Found himself lying half-meter from Trump after meeting him just 5 minutes before the chaos began 📏⏰
🔹 Describes surreal terror of life-threatening moment at what should have been elegant dinner event 🍽️💔
"Split second after my trick reveal, everything went to hell" — witness account chills 😨❄️
This is Hollywood-level crazy but it's real life 🎬😱
#WHCD#performer#witness#security
@america