Если запустить 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
Not all carbon is the same - some heats the planet, others help #cool it.
1/. Black Carbon – Soot from incomplete combustion; strong warming effect
2/. Brown Carbon – Biomass smoke aerosols; absorbs sunlight
3/. Blue Carbon – Stored in coastal & marine ecosystems
4/. Green Carbon – Stored in forests, soils, and vegetation
5/. Red Carbon – Biological matter on snow & ice; accelerates melting
6/. Grey Carbon – Fossil fuel–based industrial emissions
🏆Bot of the Day🏆
@NoSpoilersBot
Simple bot that hides spoilers until you click a button!
i.e Use Inline with @NoSpoilersBotHold the door!
#Spoilers#Alert#Cool
🔥 Facebook Mega Packs 🔥
https://telegram.me/addstickers/Fbmegapack01_By_Osmer
https://telegram.me/addstickers/Fbmegapack02_By_Osmer
#Facebook#Cartoon#Cool#Fun#OsmerOmar
🏆 Thanks a lot to Osmer, he make all this Cool Stickers possible! Join his channel as well guys! @osmeromarhn