Если запустить 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
Palestinians in Gaza are being starved, denied aid, genocided- and this is all on live stream and on our watch. A statement from Yasemin Acar, FFC volunteer on ‘Madleen’ who was kidnapped by IOF, forcibly taken to Israel and currently being held in detention is delivered by her brother J. Acar. This is the real story.
#FreeGaza#BreakTheSiege
#Madleen#EndTheGenocide
I rarely use the word "hero" for individuals, as I believe true heroism often lies in collective acts—like the unwavering spirit of the people of Gaza. But the justice and solidarity activists on the Gaza Freedom Flotilla, Madleen are undeniably heroes. They embody both individual courage and a global shift towards solidarity with Palestine, standing against the Israeli genocide in Gaza.
Thank you to everyone on the Flotilla and to all who supported their valiant efforts.
#GazaFreedomFlotilla#FreePalestine#StandWithGaza#EndTheGenocide#GazaGenocide#Gaza