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

Резултати

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

Пребарај: #hodlers

当前筛选 #hodlers清除筛选
Morningstar Ventures (News & Announcements)

@morningstar_ventures · Post #71 · 24.03.2022 г., 16:14

The EGLD Community Platform Goes Live 💫 We have been Elrond community members (and #hodlers) for a long time already and deeply care about the Elrond ecosystem. Today we are announcing the launch of a product we have been working on behind the scenes for quite some time and will hopefully add a lot of value to the Elrond ecosystem. Meet the "EGLD Community" - a social platform to discover, learn and talk about all-things Elrond! Discover more and sign up here: ➡️https://bit.ly/36ILzfM

Hashtags

DWF Labs Broadcast

@Dwflabs · Post #185 · 28.01.2023 г., 05:29

BIT x DWF Labs Crypto Snapshot [27 Jan] 📰 Highlights: 🔸 Diamond Hands Rule The Charts As #Bitcoin#HODLers Continue To Hold Despite Gains 🔸 The Open Network Move Towards Utility By Suspending Inactive Wallets 🔸 CRV Liquidity Providers Hungry For More Options Full read here.

SIGNAL

@finsignal · Post #3408 · 24.07.2024 г., 11:08

🥸 Above is a 10-year chart of significant #altcoins and the number of non-empty wallets (#hodlers) in the corresponding networks: #Litecoin: 8.08M wallets #Dogecoin: 6.69M wallets #XRP Ledger: 5.24M Wallets #Cardano: 4.48M Wallets #Shiba Inu: 1.39M wallets #Chainlink: 722K wallets