TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #402 · 22 дек.

Отдельно разберём TaskGroup, который пришел на замену gather в Python 3.11. Ключевые отличия ▫️create_task() возвращает объект asyncio.Task, у которого есть соответствюущие методы управления. То есть у нас больше контроля ▫️это контекстный менеджер, который гарантирует что все таски будут остановлены по выходу из контекста ▫️ошибка автоматически отменяет незавершенные задачи, ▫️except* передает нам ExceptionGroup, в котором каждую ошибку можно обработать отдельно import asyncio import random async def do_it() -> str: if random.random() < 0.1: raise ValueError('Oops') delay = random.uniform(0.5, 1.5) await asyncio.sleep(delay) return delay async def main(): try: async with asyncio.TaskGroup() as tg: for _ in range(10): tasks.append(tg.create_task(do_it())) for t in tasks: print(t.result()) except *ValueError as e: for err in e.exceptions: print(err) asyncio.run(main()) Рекомендую изучить страницу Coroutines and Tasks из документации, где представлено больше интересных примеров и механизмов - таймауты - отмена задач - создание задач из другого потока #async

Hashtags

Резултати

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

Пребарај: #proudlyethiopian

当前筛选 #proudlyethiopian清除筛选

🌍 DID YOU KNOW THE WORLD USES ETHIOPIAN TECHNOLOGY? 🌍 አለም የኢትዮጵያ ቴክኖሎጂ እንደምትጠቀም ያውቃሉ? Every time someone mentions "Abyssinian well" - they're honoring Ethiopia! "የአቢሲኒያ ጉድጓድ" ሲባል - ለኢትዮጵያ ክብር እየተሰጠ ነው! 🤯 MIND = BLOWN! While you were thinking Ethiopia only gave the world coffee, we were out here revolutionizing WATER ACCESS! 💧 THE ABYSSINIAN WELL: ✅ Simple, genius technology for accessing groundwater ✅ Can be installed by hand - no heavy machinery needed ✅ Works in rural areas where big drilling rigs can't reach ✅ Cost-effective solution used WORLDWIDE ✅ Named after our ancient homeland - ABYSSINIA! 🇪🇹 🌟 FROM ANCIENT WISDOM TO MODERN IMPACT: Our ancestors looked at the problem of water access and said: "Hold my tej, we got this!" And created a solution so brilliant that THE ENTIRE WORLD still calls it by our name. 🚀 ETHIOPIA'S GIFT TO HUMANITY: ☕Coffee - We gave you your morning energy 💧Abyssinian Wells - We gave you access to clean water 📅13-month calendar - We gave you a better way to count time ✍️Ancient scripts - We preserved knowledge when others couldn't write 🔥 PLOT TWIST: While everyone talks about "developing nations," Ethiopia has been developing SOLUTIONS that the whole world adopts! 🌍 EVERY DROP OF WATER from an Abyssinian well is a reminder: ETHIOPIAN INNOVATION FLOWS THROUGH THE WORLD! 💪 👑 RESPECT THE LEGACY. RESPECT THE INNOVATION. 👑 ወቅቱን አክብሩ። ፈጠራውን አክብሩ። *Next time you hear "Abyssinian well" - remember where genius comes from* 🇪🇹 #EthiopianInnovation#የኢትዮጵያፈጠራ#AbyssinianWell#WaterTechnology#EthiopianLegacy#InnovationNation#ProudlyEthiopian#TechHistory#ኢትዮጵያላይፍ#RespectTheOrigin

🔥 FROM VILLAGE TO VOGUE: HOW ETHIOPIA REDEFINES FASHION 🔥 ከገጠር እስከ ቩግ: ኢትዮጵያ ፋሽንን እንዴት እንደምትገለጽ 🌟 КОГДА ТРАДИЦИЯ ВСТРЕЧАЕТ РЕВОЛЮЦИЮ! Ethiopian youth aren't just wearing clothes - they're making STATEMENTS! 💫 👑 THE NEW ETHIOPIAN FASHION WAVE: 🎨 HABESHA KEMIS GOES GLOBAL: - Traditional white cotton dresses with colorful borders → Modern streetwear inspiration - International runways now feature Ethiopian-inspired designs - What grandmothers wore to church, Gen Z wears to fashion week! 💎 ETHIOPIAN FASHION BRANDS TAKING OVER: 🌟YEFIKIR Design - Contemporary takes on traditional silhouettes 🌟Mahlet Afework Designs - Haute couture meets heritage 🌟ENDA Ethiopian - Athletic wear inspired by Ethiopian runners 🌟Mafi Mafi - Luxury accessories with cultural storytelling 🌟Solerebels - Eco-friendly footwear that conquered the world 🔥 THE SWAG FORMULA: ✨ Ancient patterns + Modern cuts = FIRE ✨ Handwoven fabrics + Contemporary styling = ICONIC ✨ Cultural pride + Global appeal = UNSTOPPABLE 📸 STREET STYLE ADDIS: - Netela shawls worn as haute couture wraps - Traditional jewelry mixed with designer pieces - Coffee ceremony dresses styled for Instagram - Berbere-colored accessories (that spice aesthetic!) 🌶️ 🚀 PLOT TWIST: While the world chases fast fashion, Ethiopia creates TIMELESS pieces that tell 3000-year-old stories! 💪 YOUNG ETHIOPIANS SAY: "We don't follow trends - WE SET THEM!" "እኛ ዝንባሌዎችን አንከተልም - እኛ እናዘጋጃለን!" 👗 WHEN YOU WEAR ETHIOPIAN: You're not just dressed - you're carrying HISTORY, CULTURE, and FUTURE in one look! *Ethiopian fashion: Where every thread tells a story* 🧵✨ #EthiopianFashion#የኢትዮጵያፋሽን#HabeshaStyle#EthiopianDesigners#AfricanFashion#FashionRevolution#TraditionalMeetsModern#EthiopianBrands#ኢትዮጵያላይፍስታይል#ProudlyEthiopian