Если запустить 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
¡Atención! 🚨
‼️El ultraderechista, Eduardo Verástegui ha puesto distancia con Trump y su política bélica.
Además, se lanzó con todo contra #BenjaminNetanyahu
"Jamás sería aliado de un régimen sionista genocida liderado por un criminal como Benjamín Netanyahu"
¿Qué opinas de sus palabras? 😱
In an unprecedented move following his shock proposal for the permanent resettlement of the more than two million Palestinians from Gaza to neighboring countries, President Donald Trump announced a controversial plan for the U.S. to take over the Gaza Strip. This statement, made during a press conference with Israeli PM Benjamin Netanyahu, raised eyebrows worldwide. A journalist cornered Trump so he sought Bibi’s help to complete his answer.
#UnitedStates#Israel#DonaldTrump#BenjaminNetanyahu#GazaStrip
Parla il Primo Ministro, #BenjaminNetanyahu, durante la conferenza organizzata da Jewish News Syndicate a #Gerusalemme: "#Israele ha impedito agli aerei iraniani di raggiungere la #Siria prima della cacciata di #Assad".
In his last interview as president of the United States, Joe Biden tells the story of his first meeting with Netanyahu in Israel after October 7. Bibi told Joe: “We did in Gaza what you did in Berlin.”
#UnitedStates#JoeBiden#BenjaminNetanyahu#Israel#Gaza#Palestine
The #ceasfire deal in #Gaza is on the ropes as #BenjaminNetanyahu tries to keep his government from collapsing after #Trump’s buddy #StevenWitkoff reportedly got the Israeli PM to cave.