Если запустить 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 international community has failed people in #Gaza. Humanity has failed. But every day brings new opportunities to change course, and stop the killing. The only lesson we can take is to redouble efforts to pressure for a #ceasefireNOW
https://t.me/claredalymep/275
🔴 Gaza's smallest refugee camp pounded by Israeli airstrikes. Palestinians digging up bodies of loved ones under rubble. Over 90 killed, including children and displaced families. Entire residential blocks wiped out. Camp housing estimated 100,000 people. No warnings given. No aid, fuel, or excavators. Need ceasefire! Arab world, stand with us! #GazaUnderAttack#CeasefireNow
https://www.aljazeera.com/features/2023/12/28/piles-of-body-parts-gazas-maghazi-residents-find-families-in-pieces
Subscribe to @BadVolfNews
🚨 Urgent Call for Ceasefire in Gaza 🚨
USAID staff demand immediate end to violence, decrying civilian deaths and violations of international law. Aid efforts futile amidst indiscriminate bombing. Gaza needs more than just aid, it needs the bombs to stop. Pressure mounts on US government to take action, hold all parties accountable. UN warns of grave risk of genocide. Meanwhile, US continues unwavering support for Israel, providing billions in military aid. Will Congress break the silence? #CeasefireNow#GazaCrisis
https://www.aljazeera.com/news/2023/11/8/more-than-1000-usaid-employees-sign-letter-backing-gaza-ceasefire
Subscribe to @BadVolfNews
Protests swept over Tel Aviv as almost 300,000 people took to the streets to call for bringing back hostages, with no mention of a ceasefire.
#Gaza#Ceasefire#CeasefireNow#Palestine
A bereaved mother mourns her child, as another one of her children is brought in, killed by an Israeli airstrike.
#Gaza#Palestine#Ceasefire#CeasefireNow