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

Резултати

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

Пребарај: #cryptoindex

当前筛选 #cryptoindex清除筛选

🤣以太區塊鏈新聞 #恐懼貪婪指數 🚨【 #FearandGreed 回升:市場情緒略有修復】🌚加密貨幣恐懼與貪婪指數自昨日的 24(極度恐懼) 回升至 38(恐懼)情緒出現初步修復跡象 #FearnGreed#市場情緒#CryptoIndex

Crypto M - Crypto News

@CryptoM · Post #65098 · 11.04.2026 г., 00:52

🚀 Altcoin Season Index Remains Steady at 35 CoinMarketCap's Altcoin Season Index has maintained its position at 35, unchanged from the previous day. According to NS3.AI, this index measures the performance of leading cryptocurrencies compared to Bitcoin over the past 90 days. #Altcoin#Crypto#Bitcoin#CoinMarketCap#Cryptocurrency#AltcoinSeason#NS3AI#CryptoIndex#CryptoNews#BTC

Crypto M - Crypto News

@CryptoM · Post #64469 · 09.04.2026 г., 01:45

🚀 Altcoin Season Index Remains Steady at 34 CoinMarketCap's Altcoin Season Index has remained at 34, showing no change from the previous day. According to NS3.AI, this index evaluates the 90-day performance of the top 100 cryptocurrencies, excluding stablecoins and wrapped tokens, in comparison to Bitcoin. #AltcoinSeason#Cryptocurrency#CryptoMarket#Bitcoin#Altcoins#CoinMarketCap#CryptoIndex#NS3AI#BTC

Crypto M - Crypto News

@CryptoM · Post #65000 · 10.04.2026 г., 13:19

🚀 CoinDesk 20 Experiences Slight Decline Amid Mixed Asset Performance The CoinDesk 20 index recorded a minor decrease, trading at 2,007.93, reflecting a 0.2% drop or a decline of 3.4 points from the previous day's close. According to NS3.AI, individual asset performances varied, with HBAR experiencing a 1.9% decline and ADA falling by 1.3%. In contrast, AVAX saw a rise of 0.6%, while BTC increased by 0.3%. #CoinDesk20#CryptoMarket#HBAR#ADA#AVAX#BTC#CryptoIndex#AssetPerformance

Crypto M - Crypto News

@CryptoM · Post #64668 · 09.04.2026 г., 13:18

🚀 CoinDesk 20 Experiences Slight Decline as ICP Leads Gains The CoinDesk 20 index recorded a slight decrease, trading at 1,982.06, marking a 0.6% drop since 4 p.m. ET on Wednesday. According to NS3.AI, Bitcoin remained stable during this period. Internet Computer Protocol (ICP) emerged as the leading gainer with a 1.5% increase, while AAVE and Stellar (XLM) were among the assets experiencing declines. #CoinDesk20#ICP#Bitcoin#AAVE#Stellar#Cryptocurrency#MarketDecline#CryptoIndex#BTC