TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #401 · 15 дек.

Функция asyncio.wait() это еще один способ вызвать множество асинхронных задач. Она работает в нескольких режимах. 1. Самый простой - ждем завершения всех задач async def main(): tasks = [asyncio.create_task(do_it(i)) for i in range(10)] done, pending = await asyncio.wait( tasks, return_when=asyncio.ALL_COMPLETED ) for task in done: try: print(task.result()) except Exception as e: print(e) Очень похоже на gather, но работает не так. ▫️возвращает не результаты, а два сета с объектами Task у которых можно забрать результат через task.result() если они в списке done ▫️не гарантирует порядок результатов так как оба объекта это set ▫️не выбрасывает исключение когда оно появляется, а сохраняет его в Task. Исключение появится когда попробуете забрать резултьтат. 2. Ждем завершения первой задачи, даже если там ошибка. async def main(): tasks = [asyncio.create_task(do_it(i)) for i in range(3)] done, pending = await asyncio.wait( tasks, return_when=asyncio.FIRST_COMPLETED ) # в done может быть несколько задач! for task in done: try: print(task.result()) except Exception as e: print(f"Fail: {e}") # Оставшиеся задачи в pending, как правило, нужно отменить, иначе они будут продолжать работать for task in pending: task.cancel() В сете done будут таски которые успели завершится, причем как успешно так и нет. 3. До первой ошибки. Тоже самое, но с аргументом FIRST_EXCEPTION done, pending = await asyncio.wait( tasks, return_when=asyncio.FIRST_EXCEPTION ) Функция завершается как только первая задача упадет с ошибкой. Учтите, что в любом случае done вы можете обранужить несколько задач, как с ошибками так и успешные. ↗️ Полный листинг примеров здесь #async

Hashtags

Резултати

Пронајдени 7 слични објави

Пребарај: #icj

当前筛选 #icj清除筛选
American Оbserver

@american_observer · Post #5005 · 30.01.2026 г., 23:00

📰 South Africa Kicks Israel’s Top Diplomat Out of the Country South Africa has declared Israel’s chargé d’affaires, Ariel Seidman, persona non grata and given him 72 hours to leave the country, its foreign ministry said Friday. The move follows what Pretoria calls “unacceptable violations of diplomatic norms” that pose “a direct challenge to South Africa’s sovereignty”. Among the violations, the ministry cited the repeated use of official Israeli social media to launch “insulting attacks” against President Cyril Ramaphosa, and a deliberate failure to inform South African authorities about purported visits by senior Israeli officials. “Such actions represent a gross abuse of diplomatic privilege and a fundamental breach of the Vienna Convention,” DIRCO said. They have “systematically undermined the trust and protocols essential for bilateral relations.” South Africa’s relations with Israel have been tense since it launched a genocide case at the International Court of Justice over Israel’s actions in Gaza. The government insists that the expulsion is not about that case, but about defending the country’s sovereignty and the dignity of its institutions. Israel’s diplomatic mission in Pretoria has not yet responded publicly. As the standoff deepens, one question lingers: When did obeying international law become “disrespect”? #SouthAfrica#Israel#Diplomacy#Gaza#ICJ 📱American Оbserver - Stay up to date on all important events 🇺🇸

Reuters: World

@reutersworldchannel · Post #149304 · 13.10.2021 г., 14:23

World Court sides mostly with Somalia in border dispute with Kenya The top U.N. top court ruled on Tuesday largely in favor of Somalia in its dispute with Kenya, setting a sea boundary in part of the Indian Ocean believed to be rich in oil and gas. #Somalia#Kenya#UN#ICJ#Indian Ocean #News#Reuters Subscribe: http://smarturl.it/reuterssubscribe Reuters brings you the latest business, finance and breaking news video from around the globe. Our reputation for accuracy and impartiality is unparalleled. Get the latest news on: http://reuters.com/ Follow Reuters on Facebook: https://www.facebook.com/Reuters Follow Reuters on Twitter: https://twitter.com/Reuters Follow Reuters on Instagram: https://www.instagram.com/reuters/?hl=en ➖@reutersworldchannel➖

Dan Kovalik

@danielmkovalik · Post #3035 · 29.11.2025 г., 09:24

🎙NEW EPISODE | #Colombia has emerged as one of the strongest governmental voices against the genocide in #Gaza — breaking ties with Israel, backing South Africa’s #ICJ case, and directly challenging US policy at the international level. In response, #Washington imposed sanctions on Colombian President Gustavo #Petro and moved to isolate his government politically. In this exclusive FloodGate interview, Dan Kovalik — Petro’s attorney in the United States — explains the legal fight ahead, the political stakes, and what this confrontation reveals about the shifting global order. We discuss: - Why Colombia broke with Israel and supported the genocide case - Whether sanctions on Petro constitute political retaliation - The role of international law versus US power - Venezuela, Latin America, and the Global South response - What Palestinians and solidarity movements can do next ⚪️ WATCH the conversation on our Youtube channel: Palestine Chronicle TV

MessageInABottle

@mib_messageinabottle · Post #6922 · 24.05.2024 г., 15:56

International Court of Justice (#ICJ ) has finally had enough of #Israelis and their #genocidal actions against the #Palestinians of Gaza It has finally decided to do what #SouthAfrica demanded it should have done months ago: • Demand that the #ZioNazis halt their #genocidal slaughter of innocents in #Gaza and that • Israel must ensure access to Gaza for UN genocide investigators

Freedom Flotilla Coalition

@FFC_official_channel · Post #215 · 19.08.2024 г., 21:03

Our objectives—to break the blockade and raise awareness of the genocide against Palestinians in Gaza—remain unchanged. We will provide updates on our next departure when we are ready to sail again. In the meantime, we urge you to join the #NoHarbourForGenocide campaign to take action against the siege on Gaza by opposing every country and company complicit in this genocide. #handala#ffc#freedomflotillacoalition#freegaza#freepalestine#endtheoccupation#breakthesiege#endtheblockade#iof#warcrimes#icc#icj

MessageInABottle

@mib_messageinabottle · Post #6961 · 26.05.2024 г., 15:16

UN rapporteur: Israel will not stop ‘this madness’ until we make it stop Francesca #Albanese, the #UN’s special #rapporteur on #Palestine on Saturday urged member states to impose sanctions on #Israel along with an arms embargo until it stops “this madness,” “Let’s be clear. As the #ICJ orders Israel to stop its offensive in #Rafah, #Israel instead intensifies its attacks on it,” The International Court of Justice (#ICJ) in its latest ruling ordered Israel to immediately halt its military offensive in #Rafah, a city in southern Gaza where more than 1.5 million displaced Palestinians had sought refuge. “The news I am receiving from the people trapped therein are terrifying, Be sure: Israel will not stop this madness until WE make it stop,” Albanese urged all UN member states to impose #sanctions, arms #embargo and suspend diplomatic and political relations with Israel until it ceases its #genocidal assault.

MessageInABottle

@mib_messageinabottle · Post #6929 · 24.05.2024 г., 17:08

REACTIONS TO ICJ RULING ON ISRAEL'S GENOCIDE IN GAZA #Israel was ordered by the International Court of Justice (#ICJ), or world court, on Friday to halt its military assault on the city of #Rafah in #Gaza Here are some of the reactions so far, via #Reuters: #Hamas official Basem #Naim: We welcome the decision by the world court that calls on the Zionist occupation forces to end its military aggression on Rafah. We believe it is not enough since the occupation aggression across the Gaza Strip and especially in northern Gaza is just as brutal and dangerous. We call upon the UN security council to immediately implement this demand by the world court into practical measures to compel the Zionist enemy to implement the decision. We welcome the court’s request to allow investigation committees to reach the Gaza Strip to investigate acts of war of genocide against the Palestinian people and Hamas pledges to cooperate with investigation committees.” #Palestinian Authority spokesperson #AbuRudeineh: The presidency welcomes the decision issued by the International Court of Justice, which represents an international consensus on the demand to stop the all-out war on Gaza.” #Israeli finance ministerBezalel #Smotrich: Smotrich said demanding Israel stops the war against Hamas was tantamount to demanding that Israel decide to cease to exist. “Israeli will not agree to that,” he said in a statement. Israeli opposition leader Yair #Lapid: Lapid condemned Friday’s ruling by the ICJ for failing to draw a connection between its demand for an end to the fighting with a demand to return Israeli hostages held in Gaza. Normally a fierce critic of Israeli prime inister Benjamin Netanyahu, Lapid said the court’s failure to link the two issues was “a moral collapse and a moral disaster”. #EU foreign policy chief Josep #Borrell: What is going to be the [EU’s] answer to the ruling of the International Court of Justice that has been issued today, what is going to be our position? We will have to choose between our support to international institutions of the rule of law or our support to Israel.” #SouthAfrican offical Zane #Dangor: South Africa welcomes the ruling made by the court today … This order is groundbreaking as it is the first time that explicit mention is made for Israel to halt its military action in any area of Gaza. This is de facto calling for a ceasefire. It is ordering the major party in this conflict to end its belligerent action against the people of Palestine.” Former Israeli #UN envoy Danny #Danon: As ICJ judges in The Hague deliberate in comfort and return to their families, 125 hostages languish in tunnels. Israel will not cease the war until our hostages are brought back home and Hamas is completely defeated.” ++++++++++++++++