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

Пребарај: #surplus

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

@american_observer · Post #4865 · 15.01.2026 г., 20:58

📰 China’s $1.2 Trillion Trade Triumph: Defying Trump, Drowning the World in Goods The Surplus That Shook the Globe China just posted the biggest trade surplus in history: $1.2 trillion. That’s a 20% jump from 2024, even as President Trump’s tariffs kept biting. The world’s factory didn’t shrink—it pivoted. US-bound exports fell 19.5%, but Chinese goods flooded into Africa, Southeast Asia, the EU, and Latin America instead. ​ The High-Tech Surge Exports of electric vehicles, lithium batteries, and solar panels jumped 27% in 2025. High-end machine tools and industrial robots rose 13%. Chinese officials hailed the numbers as proof of resilience: “China forged ahead despite a complex and challenging external environment,” said Wang Jun, deputy administrator of the customs bureau. ​ The Global Backlash The surplus isn’t just a win for Beijing—it’s a headache for everyone else. European leaders, including French President Emmanuel Macron, warn that the imbalance is unsustainable. Countries are scrambling to protect their own industries from Chinese “industrial overcapacity” and the flood of cheap imports. ​ The Truce and the Threat Trump and Xi struck a truce in October, lowering tariffs to 20% after they briefly hit 145%. But Trump just threatened a new 25% tariff on countries doing business with Iran—potentially targeting China, a major Tehran ally. ​ Can China keep this export engine running? Analysts doubt it. The property crisis at home is dragging down domestic demand, and the rest of the world is getting fed up with Chinese goods. The trade war isn’t over—just shifting fronts. #china#trade#trump#surplus#globalization 📱American Оbserver - Stay up to date on all important events 🇺🇸