Если запустить 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
Jake Paul knocked out Mike Perry in the 6th round 👊
I expected to win. I should have won in the first round, but Perry survived. Mike Tyson, you're next, sign the contract.
#Box
👁Subscribe to Main Event | Sport News
Jake Paul on the fight with Mike Perry:
"Maybe at the beginning, he’ll land a couple of heavy shots, maybe he’ll be all wild and unpredictable, but as the fight progresses, I’ll start breaking him down with my footwork, jab, and body shots."
#Box
👁Subscribe to Main Event | Sport News
Diaz Sues Organizers of Fight with Masvidal
#box#mma
Nate Diaz has filed a lawsuit against the organizers of the fight with Jorge Masvidal.
Nate claims he had an agreement for a $10,000,000 payout for the fight. He received an advance payment of $1,000,000, with the remaining $9,000,000 to be paid after the fight. The lawsuit states that the company is refusing to make the payments, claiming that the event was unprofitable.
👁Subscribe to Main Event | Sport News