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

Резултати

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

Пребарај: #gst

当前筛选 #gst清除筛选
gov.sg

@Govsg · Post #1890 · 31.12.2023 г., 06:13

With the #GST rate change on 1 Jan 2024, here are some scenarios you may find yourself in. 👉🏻 Swipe to find out how the rate change affects your ongoing or upcoming transactions. 📷: @irassg More info here: go.gov.sg/GSTratechange2024

Hashtags

겁나빠른 경제 전문 - 뉴스 드리고

@dreago_news_ch · Post #262916 · 13.05.2026 г., 08:12

🔔 GST 주가, 5월 13일 66,500원 4.40% 상승 마감 📈#GST 📝#코스닥#증권 주요 주가 상승이 확인되었으나, PER이 업종 평균보다 낮아 추가 상승 여력이 다소 제한적일 수 있습니다. ⬜⬜⬜⬜⬜│🟥⬜⬜⬜⬜ 【 겁나빠른 #드리고봇 뉴스 】 https://www.topstarnews.net/news/articleView.html?idxno=16059597

IRAS

@irassg · Post #725 · 22.12.2023 г., 06:30

Navigate the right GST rate to pay for transactions spanning the rate change with new mummy and her bestie! 💁‍♀️💡 A transaction is considered to span the GST rate change if one or two of the following events takes place wholly or partially on/after 1 Jan 2024: - The issuance of invoice by supplier - The receipt of payment by supplier - The delivery of goods or performance of services More info at go.gov.sg/irasgst-rc-consumers #GST#GSTRateChange#skit#iras#irassg

IRAS

@irassg · Post #723 · 20.12.2023 г., 09:10

🎵 We carry through, do what we need to do~ Yes, I’m a GST-registered business just like you 🎵 Here are 3 key things GST-registered businesses need to prepare for the 2024 GST rate change: 1) Update systems to incorporate 9% GST from 1 Jan 2024 2) Prepare price displays to reflect 9% GST from 1 Jan 2024 3) Understand transitional rules to apply the correct GST rate for transactions spanning 1 Jan 2024 Learn more at go.gov.sg/irasgst-rc-businesses #GST#GSTRateChange#iamjustlikeyou#iras#irassg