Если запустить 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
Everything you need To clean your home and car is available on our store with a $100 coupon.
Store 👇
https://temu.to/k/ueopn67ps3d
#bedroom#livingroom#furniture#homefurniture#sofa
Everything you need To clean your home and car is available on our store with a $100 coupon.
Store 👇
https://temu.to/k/ueopn67ps3d
#bedroom#livingroom#furniture#homefurniture#sofa
Everything you need to renovate your home is available on our store with a $100 coupon.
To order the product, type in the search “compressed sofa”
Store 👇
https://temu.to/k/ueopn67ps3d
#bedroom#livingroom#furniture#homefurniture#sofa