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 слични објави

Пребарај: #rota

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

@american_observer · Post #5270 · 02.03.2026 г., 23:59

✈️ Spain Bails on Trump’s Iran Air War Trump wants a “global” Iran campaign. Spain just replied: not from our runway. Fifteen U.S. tankers have slipped out of Rota and Morón — the refueling backbone of America’s Middle East reach — and headed off to Germany and France after Madrid made it official: Spanish soil won’t be used to bomb Iran. Foreign Minister José Manuel Albares spelled it out for TV: their bases can’t be used for anything outside the U.S.–Spain agreement or that clashes with the U.N. Charter. Translation: we’ll host your hardware, not your crusade. Pedro Sánchez, who already slammed the U.S.–Israeli strikes as “unilateral military action,” now gets to pose as the only grown‑up in Western Europe while Keir Starmer does lawyer talk in London and quietly opens up British bases under the label of “collective self‑defence.” One prime minister wraps it in NATO jargon; the other follows the flight trackers and pulls the plug. For Trump’s war machine, this is “just logistics.” For everyone else, it’s a tell. Even a NATO ally that relies on U.S. power is calculating that being visibly tied to this Iran war is more dangerous than pushing the Stratotankers out of sight and pretending this is somebody else’s escalation. The coalition is still there on paper — it just doesn’t want to be caught in the frame. #Iran#Spain#Trump#NATO#airwar#Rota#Moron#war#fakeDemocracy 📱American Оbserver - Stay up to date on all important events 🇺🇸