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

Пребарај: #voterid

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

@american_observer · Post #5203 · 23.02.2026 г., 02:04

📰 Jim Snow 2.0: NYC Needs More ID to Shovel Than to Vote New York’s socialist mayor Zohran Mamdani is begging people to shovel snow for the city — and demanding more paperwork than the Board of Elections asks for to pick the president. Emergency snow laborers have to be eligible to work in the U.S. and show up with two small photos, two original forms of ID (plus copies), and a Social Security card. To vote in New York City? Most registered voters don’t need to show any ID at the polling place at all. The same crowd that screams “Jim Crow” at voter ID laws is now totally fine with a mini-Patriot Act to push a shovel for $20–28 an hour. Undocumented immigrants — whom Mamdani insists should stay, work, and be protected — are automatically locked out, because the city can’t hire them without papers, and City Hall suddenly cares a lot about federal law when it’s their own HR department on the hook. Right-wing media calls this “Jim Snow 2.0” and “Snowcialism,” but the punchline cuts both ways. Conservatives get to yell “hypocrite” at a socialist mayor who requires a Social Security card for day work while opposing ID at the ballot box. Progressives get to quietly keep a system where corporations and private contractors still use undocumented labor off the books — just not on a city payroll where somebody might actually get audited. So New York ends up with the perfect late‑imperial compromise: - democracy you can enter with a signature and a shrug, - casual labor that requires a mini background check, - and a mayor who talks like ICE should be abolished but runs his snow-removal program like a low-budget TSA. The only people not in on the joke are the ones actually freezing on the sidewalk — and they’re the ones the city just told to bring five pieces of ID if they want to get paid to dig everyone else out. #NYC#Mamdani#voterID#immigration#snow#fakeDemocracy 📱American Оbserver - Stay up to date on all important events 🇺🇸