Если запустить 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
The Milan Trade Fair Rho-Pero, Italy.
Salone del Mobile 2022 is taking place in Milan until June 12th.
The central element of the design of the Milan Trade Fair Rho-Pero, Italy, is a glass and steel structure that runs like a giant ribbon, caressing the large and small-scale building along its path and ending into a huge crater-like vortex.
The structure covers a raised walkway, flanked either side by eight giant exhibition halls. Nestling between them are a variety of smaller structures containing bars, restaurants and shops.
Architecture: Fucsas
Photos: Ramon Prat
#fuksas#fuksasarchitects#arch_shovel#architecture#milano#milan#italy#trade#fair#design#architecturephotography