TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #401 · 15 дек.

Функция asyncio.wait() это еще один способ вызвать множество асинхронных задач. Она работает в нескольких режимах. 1. Самый простой - ждем завершения всех задач async def main(): tasks = [asyncio.create_task(do_it(i)) for i in range(10)] done, pending = await asyncio.wait( tasks, return_when=asyncio.ALL_COMPLETED ) for task in done: try: print(task.result()) except Exception as e: print(e) Очень похоже на gather, но работает не так. ▫️возвращает не результаты, а два сета с объектами Task у которых можно забрать результат через task.result() если они в списке done ▫️не гарантирует порядок результатов так как оба объекта это set ▫️не выбрасывает исключение когда оно появляется, а сохраняет его в Task. Исключение появится когда попробуете забрать резултьтат. 2. Ждем завершения первой задачи, даже если там ошибка. async def main(): tasks = [asyncio.create_task(do_it(i)) for i in range(3)] done, pending = await asyncio.wait( tasks, return_when=asyncio.FIRST_COMPLETED ) # в done может быть несколько задач! for task in done: try: print(task.result()) except Exception as e: print(f"Fail: {e}") # Оставшиеся задачи в pending, как правило, нужно отменить, иначе они будут продолжать работать for task in pending: task.cancel() В сете done будут таски которые успели завершится, причем как успешно так и нет. 3. До первой ошибки. Тоже самое, но с аргументом FIRST_EXCEPTION done, pending = await asyncio.wait( tasks, return_when=asyncio.FIRST_EXCEPTION ) Функция завершается как только первая задача упадет с ошибкой. Учтите, что в любом случае done вы можете обранужить несколько задач, как с ошибками так и успешные. ↗️ Полный листинг примеров здесь #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