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

Резултати

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

Пребарај: #send

当前筛选 #send清除筛选
Libreware

@libreware · Post #1003 · 27.10.2021 г., 01:09

Croc Easily and securely send things from one computer to another Features - allows any two computers to transfer data (using a relay) - provides end-to-end encryption (using PAKE) - enables easy cross-platform transfers (Windows, Linux, Mac, Android) - allows multiple file transfers - local server or port-forwarding not needed - ipv6-first with ipv4 fallback https://github.com/schollz/croc https://f-droid.org/en/packages/com.github.howeyc.crocgui/ 📡@NoGoolag📡@Libreware #croc#transfer#send#share

Libreware

@libreware · Post #1550 · 17.02.2026 г., 04:42

Alt-sendme — send files and folders to anywhere in the world without storing them in the cloud — any size, any format, without accounts and restrictions. A free file transfer tool with open source code, using the capabilities of an advanced peer-to-peer network, allowing you to transfer files directly without storing them on cloud servers. @github #P2P#FileTransfer#share#send#transfer

BotsGram®

@botsgram_cu · Post #3988 · 07.06.2021 г., 16:55

@etlgr_bot Qué puede hacer este bot? Obtén una dirección de correo para cualquier Chat de Telegram (grupo o usuario). Enviar y recibir correos. Idioma: Inglés (visto en @BotsGram_cu) #send, #mail, #email, #address, #welcome

BotsGram®

@botsgram_cu · Post #3379 · 11.01.2021 г., 13:10

@Shekelbot Qué puede hacer este bot? ShekelBot le ayudará a contar su dinero. Úselo, cuando le das dinero a alguien, o comparte compras. Idioma: Inglés (visto en @BotsGram_cu) #money, #track, #send, #receive, #friends, #debt

BotsGram®

@botsgram_cu · Post #3357 · 03.01.2021 г., 16:25

@posttobot Qué puede hacer este bot? Este bot le ayuda a enviar un mensaje a alguien en Telegram Messenger sin usar Telegram a través de este Bot conectado con una aplicación web. Idioma: Inglés, Ruso (visto en @BotsGram_cu) #web, #pc, #remote, #telegram, #message, #text, #send, #post, #bot, #dictionary

BotsGram®

@botsgram_cu · Post #3283 · 13.12.2020 г., 03:10

@DebtsTrackerBot Qué puede hacer este bot? Este bot realiza un seguimiento de sus deudas y envía recordatorios a usted y a los deudores por Telegram y SMS. Idioma: Español, Inglés, Ruso, Italiano (visto en @BotsGram_cu) #friend, #money, #track, #debt, #send, #receive, #issue, #website, #request