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

Резултати

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

Пребарај: #loans

当前筛选 #loans清除筛选
NIDO Russia (НИДО)

@nido_russia · Post #1907 · 02.12.2024 г., 12:42

Russian government to subsidize rural mortgages 📌The funds are provided for the purchase of housing in rural areas. 📌This was said by the Prime Minister Mikhail Mishustin, at a meeting with Deputy Prime Ministers. 📌Additional 5 billion rubles will be allocated to subsidize over 160 thousand loans (under the Rural Mortgage program) that have been concluded in recent years. 📌In July 2023, the government increased the size of the concessional loan under the "Rural mortgage" to 6 million rubles. The initial payment for the program launched in the spring of 2020 is 20%. 📌 A loan in the amount of 100 thousand to 6 million rubles is issued for a period of up to 25 years. The preferential rate of 3% is preserved. #news#russia#nido_russia#rural#housing#loans https://t.me/nido_russia

Venture Village Wall 🦄

@venturevillagewall · Post #3398 · 18.12.2024 г., 12:10

Svakarma Finance Raises $10.4M Svakarma Finance successfully raised $10.40 million in funding on December 13, 2024. For more details, visit their website. #Funding#Finance#Svakarma#Investment#Capital#Startup #2024 #Market#Growth#Innovations#Loans#FinanceTech#DigitalFinance#Fintech#VentureCapital#Equity#FundingRound#FinancialServices#Economy

Venture Village Wall 🦄

@venturevillagewall · Post #3423 · 18.12.2024 г., 12:11

VakıfBank Secures $870M Funding Round VakıfBank has announced a funding round of $870 million, set for November 26, 2024. For more details, visit their official page here. #Funding#VakıfBank#Finance#Investment#FundingRound#Banking#Loans#Capital#Turkey#Business#Economy#November2024#Growth#Market#Assets#InvestmentOpportunities#FinancialServices#InstitutionalInvestors#Debt#Equity

Venture Village Wall 🦄

@venturevillagewall · Post #4071 · 05.02.2025 г., 07:00

NBU Accuses BitCapital of Illegal Lending The National Bank of Ukraine (NBU) has accused the Ukrainian service BitCapital, which issues loans in USDT stablecoins, of providing illegal lending services. Over 700 complaints from citizens cite issues like high interest rates, wrongful charges, aggressive debt collection tactics, and lack of transparency. The service's operations in Ukraine are now banned. Read more here #Ukraine#BitCapital#USDT#Banking#Regulation#Lending#Finance#Crypto#NBU#Loans#ConsumerProtection#Debt#InterestRates#Bans#Complaints#Market#IllegalServices#Transparency#FinanceNews#VC#Crypto