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

Резултати

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

Пребарај: #medicalbreakthrough

当前筛选 #medicalbreakthrough清除筛选
America 🇺🇸 News & Politics

@America · Post #10378 · 12.03.2026 г., 06:00

💊🇺🇸FDA APPROVES BREAKTHROUGH DRUGS FOR RARE DISEASES 🔹 Yuviwel approved Feb 27 for dwarfism growth — first-ever treatment for kids 👶 🔹 Loargys gets green light for ultra-rare Arginase 1 Deficiency 🧬 🔹 Bysanti breakthrough schizophrenia drug hits market February 20th 🧠 🔹 Wellcovorin approved March 10 for cerebral folate deficiency 🧪 🔹 Takeda's narcolepsy drug oveporexton submits for late March review 😴 5 novel drug approvals in first quarter — fastest pace since 2023! 📈 Rare disease patients get hope as FDA accelerates orphan drug pipeline... 🙏✨ #FDA#MedicalBreakthrough#RareDiseases#DrugApproval @america

Google Facts™ [ ️@googlefactss🌎]

@googlefactss · Post #40408 · 25.12.2025 г., 11:03

Amanda Smith, 35, had Type 1 diabetes and needed insulin daily. In February 2023, doctors gave her new islet cells made from stem cells. By August, she no longer needed insulin because her body made it again. This treatment helped her live without constant insulin shots.💉🧬 [Read more] @googlefactss #StemCellTherapy#DiabetesTreatment#HealthFacts#MedicalBreakthrough

Google Facts™ [ ️@googlefactss🌎]

@googlefactss · Post #40834 · 20.03.2026 г., 15:04

New kidney treatments help people with kidney disease protect and preserve their kidney function. New drugs slow disease progression. Doctors can target the exact cause of kidney problems. Early tests catch issues sooner, and combination therapies help manage complications like anemia. People with kidney disease have more options to maintain their health. 🩺💊🧬✨ [Read more] @googlefactss #KidneyHealth#CKD#MedicalBreakthrough#EarlyDetection#PrecisionMedicine#HealthyLife