Если запустить 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
Curated Crypto | ꘜ
🤑WTF: ETH options open interest just hit a 1.5-year high!
Degens are loading up on longs, while whales are stacking ETH at all-time record pace!
But hedge funds are going mega short - CME ETH futures short positioning just keeps smashing new records!
Green But Red in real life!
#WTF
The suspect attempted to escape an interrogation room by breaking through the wall while no one was watching—only to be caught shortly after.
@Viral_Today / #wtf
Imagine a coffee table that moves around the house by itself—well, you don’t have to anymore because it’s real. It’s just as fascinating as it is creepy.
@Viral_Today / #wtf