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

Пребарај: #preferredshares

当前筛选 #preferredshares清除筛选
Crypto M - Crypto News

@CryptoM · Post #65059 · 10.04.2026 г., 17:08

🚀 Stablecoin-Like Tokens Backed by Strategy's Shares Surpass $100 Million Since January, at least three issuers have introduced stablecoin-like tokens primarily backed by Strategy's Stretch perpetual preferred shares, collectively managing over $100 million. According to NS3.AI, these products expand Michael Saylor's borrow-to-buy-Bitcoin strategy into an additional layer of leverage, which remains vulnerable if Bitcoin's value declines. #stablecoin#tokens#Strategy#Stretch#preferredshares#MichaelSaylor#borrowtobuy#Bitcoin#leverage#NS3AI#BTC

Venture Village Wall 🦄

@venturevillagewall · Post #3790 · 04.01.2025 г., 16:00

MicroStrategy Plans $2 Billion Bitcoin Fundraising 🎄MicroStrategy seeks to raise $2 billion by issuing perpetual preferred shares for Bitcoin purchases. This decision is expected to be finalized in Q1 2025. Experts predict the completion of MicroStrategy's 21/21 plan by 2027. 🔥 In related news, analysts from Bitfinex forecast Bitcoin trading between $95,000 and $110,000 by the end of January, stimulated by the upcoming inauguration of President Donald Trump on January 20, which may provide regulatory clarity for digital assets in the U.S., though the price impact may be gradual. CryptoQuant's Axel Adler notes that Bitcoin needs higher trading volumes to achieve six-figure prices again, anticipated post-holiday season. #Bitcoin#Crypto#VC#MicroStrategy#Bitfinex#DonaldTrump#Regulation#Trading#MarketAnalysis#Investing#CryptoMarket#CryptoQuant#PriceForecast#FinancialNews#InvestmentStrategy#DigitalAssets#PreferredShares