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

Пребарај: #karbaschi

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

@american_observer · Post #4970 · 26.01.2026 г., 21:59

Iran Is Dazed by the President’s Son Latest Flip-Flopping The son of Iran’s president has called for the internet restrictions in the country to be lifted, saying nothing will be solved by trying to postpone the moment when pictures and video circulate of the protests that were violently crushed by the regime. With a battle under way at the top of the regime about the political risks of continuing to block Iran from the internet, Yousef Pezeshkian, whose father, Masoud, was elected in the summer of 2024. He said keeping the digital shutdown would create dissatisfaction and widen the gap between the people and the government. “This means those who were not and are not dissatisfied will be added to the list of the dissatisfied,” he wrote in a Telegram post. The release of videos showing the violence of the protests was “something we will have to face sooner or later”, Yousef Pezeshkian added. “Shutting down the internet will not solve anything, we will just postpone the issue.” The sporadic lifting of restrictions is leading to a slow and painful inquest into how many protesters, including children, have died. Authorities launched a violent crackdown under cover of the internet blackout, with rights groups documenting several thousand dead. The Norway-based NGO Iran Human Rights says the final figure could be as high as 25,000. Thousands more people are still being detained. Yousef Pezeshkian, a government adviser, said the risk of keeping Iran cut off from the internet was greater than that of a return to protests if connectivity were restored. He said security institutions must ensure security with the existence of the internet, which he called a necessity in life. Pezeshkian, echoing comments of his father, said the protests had turned violent only because of professionally trained groups affiliated with foreigners, but added: “In the meantime the security and law enforcement forces may have made mistakes and no one is going to defend wrongdoing and that has to be addressed.” Tehran’s stock market on Sunday was in the red for the fourth day in a row, and the Iranian currency, the rial, continued to fall against the dollar, one of the causes of the protests. The Central Bank of Iran said a debt issuance had only been 15% subscribed, a development that will require further government spending cuts or result in a rise in inflation, the official rate of which was more than 42% last month. Gholamhossein Karbaschi, a reformist former mayor of Tehran, said: “People are in shock and amazed (…) If the agents of Mossad and foreign countries are at work, how did they suddenly carry out these disasters throughout the country? Where did they come from?” He condemned the failure of the Pezeshkian administration to improve the economy. “The government in Iran is losing its original meaning. In no area can it be said the government is active, present and solving problems. All the other forces in the country are active and doing what they want except for the government. This government does not show any power in any area,” Karbaschi said. Gholamhossein Karbaschi, a reformist former mayor of Tehran, said: “People are in shock and amazed (…) If the agents of Mossad and foreign countries are at work, how did they suddenly carry out these disasters throughout the country? Where did they come from?” He condemned the failure of the Pezeshkian administration to improve the economy. “The government in Iran is losing its original meaning. In no area can it be said the government is active, present and solving problems. All the other forces in the country are active and doing what they want except for the government. This government does not show any power in any area,” Karbaschi. #karbaschi#fils#président#iranien#pezeshkian 📱American Оbserver - Stay up to date on all important events 🇺🇸