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

Резултати

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

Пребарај: #cricket

当前筛选 #cricket清除筛选
EdgeMarket.AI 📣

@edgemarketai · Post #8128 · 24.04.2026 г., 07:54

🚨 NEW EDGE MARKET LIVE Will Chennai Super Kings win 3 matches before May 28, 2026? This is not guessing. This is signal. Trade the outcome Validate results Earn BETON for truth The crowd sees patterns before headlines do. Join now 👇 https://edgemarket.ai/bnb/cricket/will-chennai-super-kings-win-3-matches-before-may-28-2026/statistics/69e5fea2dcd75d8e462361b8 ⚡ Powered by AI + community validation ⚡ Built on dual token system ⚡ Real outcomes. Real rewards. #EdgeMarket#BETON#SIGNAL#Cricket#PredictionMarkets

EdgeMarket.AI 📣

@edgemarketai · Post #8143 · 29.04.2026 г., 09:42

RCB vs Gujarat Titans is live on EdgeMarket. You are not just watching the game You can take a position before it ends YES if RCB wins NO if Gujarat Titans win Stake. Earn. Truth. Enter the market 👇 https://edgemarket.ai/bnb/cricket/will-royal-challengers-bengaluru-defeat-gujarat-titans/statistics/69e89c14a9870bbf09e2450a #EdgeMarket#RCB#GujaratTitans#Cricket#PredictionMarkets

djangoproject

@djangoproject · Post #447 · 18.09.2017 г., 10:35

https://pybee.org/news/buzz/2017-google-summer-of-code-final-report-dayanne-fernandes/ After almost 4 months of work on Google Summer of Code 2017, finally I'm completing my proposal. Every widget migration and every commit/PR/issue/discussion with my mentors about Cricket , Toga and rubicon-objc were detailed on the Issue 58. "Eating your own dog food" The best way to show that a product is reliable to the customers is use it. So, the way to show that #Toga is an effective tool to build a #GUI is to build a complete application using it. #Cricket is a graphical tool that helps you run your #test suites. Its current version is implemented using #Tkinter as the main GUI framework. So, why not test Toga inside of another product from #BeeWare? That's what I have acomplished during my GSoC work.

ПретходнаСтраница 1 од 3Следна