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

Резултати

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

Пребарај: #prison

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

@american_observer · Post #4875 · 16.01.2026 г., 20:00

Yoon Suk Yeol: Guilty! A South Korean court has sentenced former president Yoon Suk Yeol to five years in prison for mobilising presidential security forces to block his own arrest and abusing his powers. It is the first judicial ruling linked to the events surrounding his failed martial law declaration in December 2024. The ruling is separate from Yoon’s main insurrection trial, where prosecutors earlier this week sought the death penalty and a verdict is due next month. Seoul central district court found Yoon guilty of special obstruction of official duties, abuse of power and falsifying documents, saying he had “disregarded the constitution” and shown no remorse. His legal team has said he will appeal against the ruling. The presiding judge, Baek Dae-hyun, said Yoon “deserves condemnation” for his actions. Yoon stunned South Korea late on 3 December 2024 when he declared martial law, dispatching police and armed troops to the national assembly. Lawmakers rushed to override the decree, with some climbing over fences to reach the chamber before voting to lift the order. The defendant abused his tremendous influence as president to obstruct lawful warrant execution, effectively privatising security officials sworn to serve the Republic of Korea into his personal troops,” Baek said in a televised ruling. “His crimes are extremely serious in nature.” The court also criticised Yoon’s conduct in the run-up to the martial law declaration. He selectively summoned only loyal cabinet members to a late-night meeting, excluding nine others in order to rubber-stamp the decision without meaningful deliberation. He later signed backdated documents to create the false appearance of proper cabinet approval. “Emergency martial law should only be declared in the most exceptional circumstances when no other means exist to resolve a national crisis,” Baek said. “The constitution specifically requires state council deliberation precisely to prevent presidential abuse of power and arbitrary action.” Friday’s conviction marks the opening act in a reckoning without parallel in South Korea’s democratic history. Yoon faces seven additional criminal trials, including the insurrection case, where prosecutors are seeking either the death penalty or life imprisonment. #president#southcorean#yoonsuk#prison 📱American Оbserver - Stay up to date on all important events 🇺🇸