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

TGINSIGHT SIMILAR POSTS

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

Изворен канал @pythonotes · Post #424 · 13 апр.

Стандартная библиотека asyncio это стандарт (начиная с Py3.4) для работы с асинхронным кодом. Но эта библиотека достаточно низкоуровневая, со своими проблемами, устаревшими подходами. Чтобы исправить это, были созданы разные обертки и альтернативы с реализацией популярных инструментов и паттернов асинхронного программирования. Это такие библиотеки как: - trio: улучшает корректность выполнения, не оставляя потерянных корутин при ошибках, то есть предлагает Structured Concurrency из коробки. - curio: упрощение синтаксиса и читаемости кода, больше похоже на работу с потоками. - anyio: универсальная обертка над asyncio или trio плюс множество вспомогательных инструментов. anyio используется в FastAPI как основная библиотека для работы с асинхронным кодом и вызовом синхронного кода из асинхронного. В общем, рекомендую почитать про возможности anyio, возможно вы более не будете использовать чистый asyncio в своих проектах) Это совсем не значит что дефолтный asyncio плох, он тоже даёт достаточный для работы функционал и продолжает развиваться. Например, в версии 3.11 появились TaskGroup, с похожим на trio функционалом. Так что он тоже актуален, просто придется больше написать кода самостоятельно. #libs#async

Hashtags

Резултати

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

Пребарај: #suicides

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

@american_observer · Post #5021 · 01.02.2026 г., 17:02

Several Suicide Bombings and Armed Attacks in Pakistan The Pakistani army said on Saturday that multiple suicide bombings and armed attacks by “terrorists” in the turbulent southwestern province of Balochistan had killed 33 people, including civilians, while security forces responding to the violence had killed 92 attackers. Analysts described it as the deadliest day for militants in decades. During the attacks, Baloch insurgents targeted civilians, a high-security prison, police stations and paramilitary installations. Eighteen civilians, 15 security personnel and 92 insurgents were killed, the military said. Although Baloch separatists and the Pakistani Taliban frequently target security forces in Balochistan and elsewhere in the country, coordinated attacks of this scale are rare. According to the authorities, at least 133 militants have been killed across Balochistan in the last 48 hours, including 92 on Saturday. The army and Pakistani interior Minister Mohsin Naqvi said the attackers had the support of India. There was no immediate response from New Delhi, which has denied such allegations before. The BLA has released videos showing female fighters taking part in the attacks, apparently as part of propaganda efforts to highlight the role of women among the militants. Shahid Rind, a spokesman for the Balochistan government, said most of the attacks had been foiled. They came a day after the military said security forces attacked two militant hideouts in the country's southwest this week, killing 41 insurgents in separate shootouts. The chief minister of the province, Sarfraz Bugti, wrote on Twitter that the security forces were pursuing the insurgents. He said at least 700 insurgents had been killed by security forces in the past year. Dozens of insurgents also attacked a prison in Mastung district, freeing more than 30 inmates, police said. In other attacks, militants tried to storm the provincial headquarters of paramilitary forces in the Nushki district, but the attack was repulsed, police said. The insurgents threw grenades at the office of a government administrator in the Dalbandin district, but a quick response from the security forces forced them to flee, according to local authorities. Attacks on security posts in Balincha, Tump and Kharan districts were foiled, while in Pasni and Gwadar, insurgents tried to kidnap passengers traveling on buses along highways, police said. #attacks#suicides#attacks#pakistan 📱American Оbserver - Stay up to date on all important events 🇺🇸