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

Резултати

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

Пребарај: #luxurywatches

当前筛选 #luxurywatches清除筛选
Online Education

@OnlineEducation10 · Post #646 · 07.09.2021 г., 06:08

Don't miss the 3D engraving of India's first satellite, the Aryabhata, at the back of the Apogee watches. #WatchReview by Murali K Menon at https://www.moneycontrol.com/news/luxury-lifestyle/bangalore-watch-companys-apogee-a-watch-inspired-by-isro-7368871.html #Apogee#IndianSpaceResearchOrganisation#Isrowatch#luxurywatches#ISRO @onlineeducation10

美女/时尚图片分享

@tgbestpicture · Post #9804 · 08.02.2026 г., 12:00

631 个赞,6 条评论 - watch.magazzine 于 2022 年 12 月 20 日:“壮观的皇家橡树万年历 #26579CE... 631 条赞,6 条评论 - watch.magazzine 于 2022 年 12 月 20 日发布:“黑色陶瓷款皇家橡树万年历 #26579CE 腕表。您对它的评分为 1-10 分吗?内容来自@wristaficionado #audemarspiguet#audemarspiguetwatch#audemarspiguetwatches#audemars#luxurywatches#audemarsholic#watchesfor… pinterest​.com • Feb 8, 2026

Venture Village Wall 🦄

@venturevillagewall · Post #3603 · 20.12.2024 г., 17:21

Kettle Secures $4M Funding Luxury watch trading marketplace Kettle has raised $4M in a funding round led by ParaFi Capital. Significant contributions came from Zee Prime Capital, Kronos Research, Signum Capital, IOSG Ventures, Puzzle Ventures, OSF, and Gmoney. #LuxuryWatches#Funding#Investment#Marketplace#ParaFiCapital#ZeePrimeCapital#KronosResearch#SignumCapital#IOSGVentures#PuzzleVentures#OSF#Gmoney

Venture Village Wall 🦄

@venturevillagewall · Post #4027 · 30.01.2025 г., 07:00

Trump Launches Crypto-Themed Watches Donald Trump has launched a line of luxury watches, including crypto-themed models featuring the Bitcoin logo. One limited edition model, adorned with gold, diamonds, and sapphires, is priced at $100,000, with only ten available. Read more about this and other updates on ForkLog. #Trump#Crypto#Watches#Bitcoin#Luxury#Fashion#LuxuryWatches#News#Updates#Launch#VIP#Investing#LimitedEdition#LuxuryLifestyle#NFT#Wealth#Collectibles#Investment#Trends#AI