Если запустить 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
[(260320)(#notice)]
[Drone Show Schedule]
Date/Time: From 8:30 pm to 8:45 pm, Friday, March 20, 2026 (KST)
Location: Ttukseom Hangang Park Waterfront Stage (427-6, Jayang-dong, Gwangjin-gu)
*The Drone Light Show will be live-streamed on Weverse, Youtube, and TikTok.
🔗https://weverse.io/bts/live/0-171535903
🔗https://www.youtube.com/live/j2L9F2l14UU?si=FPbLtmSORggIt5i4
📎https://weverse.io/bts/notice/34360
-@btsweverseupdate7
[(260205)(#notice)]
[NOTICE] BTS OFFICIAL LIGHT STICK VER.4 Release and Wireless Control Support
📎https://weverse.io/bts/notice/33579
-@btsweverseupdate7
[(260122)(#notice)]
[NOTICE] Warning Against Fraudulent BTS Membership and Tour Ticket Websites
📎https://weverse.io/bts/notice/33371
-@btsweverseupdate7
[(260115)(#notice)]
[NOTICE] BTS The 5th Album “ARIRANG” Pre-Order
<BTS The 5th Album “ARIRANG” Pre-Order>
Pre-Order Date
From 11 am, Friday, January 16, 2026 (KST)
Release Date
1 pm, Friday, March 20, 2026 (KST)
Shipped in the order of purchase to all countries and regions starting on the release date (March 20)
📎https://weverse.io/bts/notice/33171
-@btsweverseupdate