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

Резултати

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

Пребарај: #rally

当前筛选 #rally清除筛选
Sharmax Motors⚡️

@endurosharmax · Post #251 · 26.07.2024 г., 14:04

SHARMAX MOTORS НА РАЛЛИ ШЕЛКОВЫЙ ПУТЬ - ФИНАЛ ГОНКИ SILK WAY 2024 - международный ралли-рейд, объединяющий несколько стран торжественно завершился. Вопреки всему, несмотря на тяжелую травму, наш гонщик Александр Гилемов прошёл этот тяжелый путь на квадроцикле Sharmax FORSE 1100 EFI. Он достойно завершил гонку, не взирая на боль и преграды, и не смотря не на что завершил гонку. Как это было? Смотрите в репортаже! #sharmax#silkwayrally#шелковыйпуть#rally

International News

@intnewsagency · Post #8641 · 19.03.2026 г., 08:10

Hungarian Pro-Government Media Manipulate Orbán Rally Photo to Inflate Crowd Size Pro-government Hungarian media stretched an aerial photo of Orbán’s Sunday rally near the parliament to create an illusion of a larger crowd. Due to the location—parliament on one side, Danube on the other—the crowd size couldn’t visually expand, so panoramic stretching was applied. Nonetheless, both Orbán’s and opposition rallies were genuinely massive, filling Heroes’ Square and Andrássy Avenue. Polls indicate Orbán faces a serious risk of losing power for the first time in 16 years. #Hungary#Orbán#rally#politics The main news of Russia and the world ishere.

✅ 10 RALLY CARS🆓 • Personal Use License. #coloringpage#car#race#sport#speed#rally ◆═════● PREMIUM ●═════◆ ⭐RALLY CARS: Coloring Book PDF Ready To Print. • 27 Rally Cars. • Color Test Page. • Print-ready PDF. • 8,625 x 11,250 inches • PNG 4025 x 5250 px High quality. • Remove watermark. • Commercial Use License. 7.99€4.99€ 👉Buy Now🛒

Crypto M - Crypto News

@CryptoM · Post #64911 · 10.04.2026 г., 09:09

🚀 Bitcoin's Rebound: Bear Market Bounce or Start of a Rally? Bitcoin has experienced a 7.5% rebound, rising from approximately $67,000 to over $72,000. According to NS3.AI, Glassnode suggests that this movement still aligns with a bear-market bounce unless Bitcoin can reclaim the $81,600 level. The report identifies the $69,000–$71,500 range as near-term support, with the True Market Mean at $78,000 potentially serving as the ceiling for a relief rally. Despite the recent price increase, spot demand for Bitcoin remains weak. ETF flows are showing only modest improvements, and options traders continue to pay a premium for downside protection, indicating cautious sentiment in the market. #Bitcoin#Crypto#BearMarket#Rally#PriceAnalysis#MarketSentiment#ETF#Trading#BTC