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

Пребарај: #batch5

当前筛选 #batch5清除筛选
StartupBase

@startupbaseuz · Post #5834 · 17.06.2025 г., 06:19

📣 Open Call: Enterprise & AI Startups — Your Moment Is Now! 🚀 Plug and Play Central Asia, in partnership with IT Park Uzbekistan, is on the lookout for high-potential startups from Central Asia and around the globe to join Batch 5 of Plug and Play Tech Center Accelerator Program in Uzbekistan. Who should apply? ✔️ International startups ready to expand into Central Asia and establish a footprint in Uzbekistan ✔️ Homegrown Uzbekistan-based startups looking to scale fast with world-class support ✔️ High-growth startups with real traction and global ambition What’s in it for you? ✔️ Expert mentorship and hands-on support from Plug and Play's global network ✔️ Investment opportunities and warm intros to VCs ✔️ Exclusive access to pitch at our Expo in front of corporates and investors ✔️ Practical workshops and pitch training sessions ✔️ The chance to join Plug and Play Tech Center GOAL Program in Silicon Valley and visit other locations IT Park Ventures will review all participating startups for investment - supporting international startups considering entering Uzbekistan and helping local founders scale worldwide. Applications are open here:link 🗓 Deadline to apply: July 15, 2025 🟢 Selected startups will be announced in August. The program kicks off in early October. Apply now and let’s build the future together! #PNPTC#PlugAndPlayCA#Uzbekistan#Accelerator#Batch5#OpenCall#ITPark

IT Park Ventures

@ITParkVentures · Post #234 · 17.06.2025 г., 07:24

📣 Open Call: Enterprise & AI Startups — Your Moment Is Now! 🚀 Plug and Play Central Asia, in partnership with IT Park Uzbekistan, is on the lookout for high-potential startups from Central Asia and around the globe to join Batch 5 of Plug and Play Tech Center Accelerator Program in Uzbekistan. Who should apply? ✔️ International startups ready to expand into Central Asia and establish a footprint in Uzbekistan ✔️ Homegrown Uzbekistan-based startups looking to scale fast with world-class support ✔️ High-growth startups with real traction and global ambition What’s in it for you? ✔️ Expert mentorship and hands-on support from Plug and Play's global network ✔️ Investment opportunities and warm intros to VCs ✔️ Exclusive access to pitch at our Expo in front of corporates and investors ✔️ Practical workshops and pitch training sessions ✔️ The chance to join Plug and Play Tech Center GOAL Program in Silicon Valley and visit other locations IT Park Ventures will review all participating startups for investment - supporting international startups considering entering Uzbekistan and helping local founders scale worldwide. Applications are open here:link 🗓 Deadline to apply: July 15, 2025 🟢 Selected startups will be announced in August. The program kicks off in early October. Apply now and let’s build the future together! #PNPTC#PlugAndPlayCA#Uzbekistan#Accelerator#Batch5#OpenCall#ITPark