Отдельно разберём 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
#TRON
TRON DAO расширяет академическую программу
TRON DAO объявила о расширении инициативы TRON Academy и сотрудничестве с университетами: Dartmouth College, Princeton University, University of Oxford и University of Cambridge.
Программа направлена на поддержку студенческих блокчейн-сообществ, проведение хакатонов, образовательных мероприятий и развитие исследований в сфере Web3.
Инициатива усиливает присутствие экосистемы TRON в академической среде и ориентирована на долгосрочное привлечение разработчиков.
Just In: Tether has minted $1B $USDT on the #Tron Network.
They have minted $2B $USDT on #Tron in 2026.
https://intel.arkm.com/explorer/entity/tether
https://x.com/OnchainLens/status/2013622137429598705
Follow @onchainlens for more onchain updates
Just In: Tether has minted $1B $USDT on the #Tron Network.
They minted for the first time in 2026.
https://intel.arkm.com/explorer/entity/tether
https://x.com/OnchainLens/status/2009583998067220592
Follow @onchainlens for more onchain updates
Just In: Tether has minted $1B $USDT on the #Tron Network. In 2025, they minted $26B $USDT on @trondao. https://x.com/OnchainLens/status/2006009190461198524 Follow @onchainlens for more onchain updates
Just In: Tether has minted $1B $USDT on the #Tron Network.
In 2025, they minted $26B $USDT on @trondao.
https://x.com/OnchainLens/status/2006009190461198524
Follow @onchainlens for more onchain updates
💸 More Subsidies, Smoother Transfers!
TokenPocket has officially increased the monthly TRON transfer subsidy pool — giving more users the chance to enjoy gas-free transactions on @trondao.
✅ No $TRX? No problem — TP covers it!
✅ Seamless experience for new and active users.
✅ Available across all #TRON addresses in TokenPocket.
Start sending with zero hassle and enjoy effortless transfers today! 👉tp.xyz
💙 With TokenPocket, Discover More on TRON.
> Experience seamless integration with the TokenPocket Chrome Extension on the #TRON network.
👉https://extension.tokenpocket.pro
JustLend DAO is TRON's leading DeFi platform, offering lending, staking, and more native TRON services with over $7.6B TVL.
Now, with TokenPocket, you can seamlessly access JustLend DAO through the TokenPocket Chrome Extension on TRON.
Manage your assets, stake $TRX, and maximize your DeFi experience—all in one place!🚀
Now you can use $USDT to cover TRON gas fees on TokenPocket!
Check out how Cointelegraph introduces this feature! #TRON👇
https://cointelegraph.com/news/no-trx-no-problem-tron-network-wallet-uses-usdt-for-transaction-fees
❓What's the best way to save gas costs on TRON?
🎯Pro Tip: Enable TokenPocket's TRON Energy Rental Service.
e.g. ⤵️
Before: 27.25 $TRX For One Transaction
After: 7.71 $TRX For One Transaction
✅Save 72.95% on Gas Costs!
TokenPocket's TRON Energy Rental Service can help you save up to 75% on gas costs on TRON of each transaction! $TRX #TRON
🔴Save Gas Anytime, Anywhere!
TokenPocket TRON Energy Rental service is available for all the DApps live on TRON!
🎯No matter what interactions you make on TRON, you can use the #TRON Energy Rental service to Save $TRX, which can help you save up to 75% on gas costs!
Guide👉https://help.tokenpocket.pro/en/wallet-faq-en/tron-wallet/energy-rental