Если запустить 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
🚨 Freedom for Palestinian journalist Mustafa Ayyash 🚨
Austria is forcibly detaining Mustafa Ayyash since his arrest, without any judicial ruling, and has disabled his social media accounts to silence his voice.
A Palestinian journalist, a voice for Gaza and Palestine, now needs our voices.
📢 We demand immediate disclosure of his safety and his immediate release!
#Prisoners
#FreedomForMustafaAyyash
#ExecutionOfPalestinianPrisoners
#PrisonersExecutionLaw
O Allah, grant relief to all Muslim prisoners and restore their freedom and safety swiftly, not delayed.
#Prisoners
#FreedomForMustafaAyash
#ExecutionOfPalestinianPrisoners
#ExecutionOfPrisoners
#FreeMustafaAyash
#FreedomForMustafaAyashFromAustrianPrisons
O Allah, grant relief to all Muslim prisoners, and restore to them freedom and safety without delay.
#Prisoners
#FreedomForMustafaAyyash
#ExecutionOfPalestinianPrisoners
#PrisonersExecutionLaw
#freemustafaayash
#FreedomForMustafaAyyashFromAustrianPrisons
#ExecutionLaw
Be Daraa, protecting the prisoners and those released.
#PrisonersAndReleasedFriday
#PrisonersAreARedLine
#WeWillOpenOurAlAqsa
#SaveThePrisoners
#Prisoners
#FreedomForMustafaAyash
#ExecutionOfPalestinianPrisoners
#ExecutionOfPrisoners
#FreeMustafaAyash
#FreedomForMustafaAyashFromAustrianPrisons