Если запустить 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
🌍 Atmospheric rivers—narrow bands of moisture in the sky—can carry more water than the Amazon River. When these “rivers in the air” hit land, they unleash heavy rains and reshape water cycles. ✨
#hydrology⚡#rainfall⚡#climate⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography
👉more Channels
🌍 The equatorial climate zone gets nearly the same amount of daylight all year, making temperatures steady and rainfall high—some spots see over 200 wet days annually with barely any seasonal change. ✨
#climate⚡#equator⚡#rainfall⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography🌍
🌍 In the world’s subtropical climate zones, some deserts like the Sahara and Arabian receive less than 2 centimeters of rain a year—making them among the driest places on Earth. ✨
#climatezones⚡#deserts⚡#rainfall⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography🌍
🌍 Some climate zones, like the monsoon zone, see one season bringing almost all their annual rain in just a few weeks. This sudden wet season shapes ecosystems and water supplies for millions. ✨
#climatezones⚡#monsoon⚡#rainfall⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography
👉more Channels