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

TGINSIGHT SIMILAR POSTS

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

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

Отдельно разберём TaskGroup, который пришел на замену gather в Python 3.11. Ключевые отличия ▫️create_task() возвращает объект asyncio.Task, у которого есть соответствюущие методы управления. То есть у нас больше контроля ▫️это контекстный менеджер, который гарантирует что все таски будут остановлены по выходу из контекста ▫️ошибка автоматически отменяет незавершенные задачи, ▫️except* передает нам ExceptionGroup, в котором каждую ошибку можно обработать отдельно import asyncio import random async def do_it() -> str: if random.random() < 0.1: raise ValueError('Oops') delay = random.uniform(0.5, 1.5) await asyncio.sleep(delay) return delay async def main(): try: async with asyncio.TaskGroup() as tg: for _ in range(10): tasks.append(tg.create_task(do_it())) for t in tasks: print(t.result()) except *ValueError as e: for err in e.exceptions: print(err) asyncio.run(main()) Рекомендую изучить страницу Coroutines and Tasks из документации, где представлено больше интересных примеров и механизмов - таймауты - отмена задач - создание задач из другого потока #async

Hashtags

Резултати

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

Пребарај: #perfidy

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

@american_observer · Post #4851 · 13.01.2026 г., 23:05

📰 U.S. War Crime? Military Used Fake Civilian Plane to Kill Drug Smugglers The Pentagon used a secret aircraft painted to look civilian—no military markings, munitions hidden inside—to strike a boat in September, killing 11. Survivors waved at the plane before a follow-up strike killed them. Legal experts say it's "perfidy," a war crime banned under laws of armed conflict. ​ What's Perfidy? Perfidy = fooling enemies by feigning civilian status, then attacking. U.S. military manuals forbid it. Former Air Force deputy JAG Steven Lepper: "If the aircraft isn't identifiable as a combatant, it shouldn't engage in combat." The boat turned back toward Venezuela after seeing the plane—then got hit. ​ Trump's "War" on Cartels Trump declared a secret armed conflict with 24 gangs/cartels, claiming boat attacks are lawful combat—not murder. But even in war, perfidy is illegal. The military has killed 123 people in 35 boat strikes. Critics say it's all illegal: you can't target civilians without imminent threat, war or not. ​ The Plane: Civilian Look, Military Mission Officials confirmed the aircraft wasn't standard military gray—no visible markings. Plane-spotters saw a white 737 with blue stripe at St. Croix in September. Military claims its transponder broadcast a military tail number—but legal experts say that doesn't count if the boat crew couldn't pick up the signal. ​ Pentagon's Defense Falls Flat Pentagon: "All aircraft undergo legal review." But Trump's team excluded JAGs and ops experts from planning. Defense Secretary Hegseth fired top military lawyers in February. Retired Navy JAG Todd Huntley: legitimate uses exist for such planes (hostage rescue), but not for offensive strikes masquerading as civilian. ​ Survivors Waved, Then Died Video shows two survivors clinging to wreckage, waving at the plane—before a second strike killed them. Targeting shipwrecked survivors is also a war crime. The military has since switched to visible MQ-9 Reapers, though it's unclear if victims could see them. ​ Bottom Line: Trump's cartel "war" just crossed into war crime territory—using fake civilian planes to trick targets, then killing survivors. When the rulebook says "don't," and you do it anyway, whose law applies?. ​ #trump#perfidy#warcrimes#pentagon#cartels 📱American Оbserver - Stay up to date on all important events 🇺🇸