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

Резултати

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

Пребарај: #zerofeetrading

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

@CryptoM · Post #64908 · 10.04.2026 г., 09:00

🚀 Binance Launches Zero-Fee Trading for BTC/U Pair According to the announcement from Binance, the platform is introducing a zero-fee trading promotion for the BTC/U spot and margin trading pair, effective from 2026-04-17 00:00 (UTC). This promotion will run until 2026-07-16 23:59 (UTC), allowing eligible users to trade without incurring maker and taker fees on this specific pair. However, during the promotion period, trading volume on the BTC/U pair will not contribute to the VIP tier volume calculation or any Liquidity Provider programs. Additionally, BNB discounts, referral rebates, and other adjustments will not apply to this trading pair. United Stables (U) is a next-generation stablecoin backed by fully fluid assets, designed to unify fragmented liquidity across various sectors including trading, payments, DeFi, institutional settlement, and AI-driven autonomous systems. It represents a "fluid" future where value seamlessly flows between humans and AI. Notably, U is the first batch of BNBChain stablecoin to support EIP-3009 gasless authorization, facilitating efficient value transfer across ecosystems. Users should be aware that standard trading fees will resume once the promotion period concludes. Trading eligibility is subject to the user's country or region of residence, with certain jurisdictions restricted from participating. These include Canada, Cuba, Crimea Region, Iran, Netherlands, North Korea, Syria, the United States and its territories, and non-government controlled areas of Ukraine. Binance reserves the right to disqualify users involved in dishonest behavior and to amend the promotion terms at its discretion. Participants must complete account verification to engage in trading these new pairs, and the list of restricted countries may change due to legal and regulatory updates. #Binance#BTCU#ZeroFeeTrading#Cryptocurrency#Stablecoin#DeFi#BNBChain#CryptoPromotion#DigitalAssets#CryptoTrading