Если запустить 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
If Donald Trump doesn’t make an attempt to buck the Constitution and run for president once again in 2028, which he has hinted at, his middle son, Eric, has indicated he might like to take his turn in the Oval Office.
#Trump#EricTrump
👂More on Trump's Ear ⚠️
Eric Trump’s Investment Advice Backfires
Eric Trump advised buying Bitcoin and Ethereum, but prices dropped 20% and 30% respectively. World Liberty Financial's portfolio fell by $110 million. His praise messages were deleted after the crash. A false report on ETH purchase circulated, later debunked. For more info, visit ForkLog.
#Bitcoin#Ethereum#Crypto#Investment#MarketCrash#WorldLiberty#FinancialNews#EricTrump#ETH#BTC#Trading#Blockchain#TechNews#Assets#Speculation#Finance#MarketStrategy#News