@MyGovCoronaNewsdesk · Post #13350 · 23.02.2025 г., 05:34
119th Episode of Mann Ki Baat Watch Live: https://www.youtube.com/watch?v=Xzi-vKiibyI #MannKiBaat
Hashtags
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
Пребарај: #mannkibaat
@MyGovCoronaNewsdesk · Post #13350 · 23.02.2025 г., 05:34
119th Episode of Mann Ki Baat Watch Live: https://www.youtube.com/watch?v=Xzi-vKiibyI #MannKiBaat
Hashtags
@MyGovCoronaNewsdesk · Post #13326 · 19.01.2025 г., 10:22
#MannKiBaat
Hashtags
@MyGovCoronaNewsdesk · Post #13325 · 19.01.2025 г., 10:22
#MannKiBaat
Hashtags
@MyGovCoronaNewsdesk · Post #13324 · 19.01.2025 г., 10:22
#MannKiBaat
Hashtags
@MyGovCoronaNewsdesk · Post #13323 · 19.01.2025 г., 10:22
#MannKiBaat
Hashtags
@MyGovCoronaNewsdesk · Post #13322 · 19.01.2025 г., 04:51
Stay tuned for the 118th episode of #MannKiBaat, today at 11 AM. 🔗https://www.youtube.com/live/Di-GyUIU72U?si=4lDtrHgq-N_XnOoM
Hashtags
@MyGovCoronaNewsdesk · Post #13301 · 16.12.2024 г., 06:33
Have an inspiring story to share with India? Send it to PM Narendra Modi and stand a chance to be featured on #MannKiBaat. Your story could ignite positivity across the nation. Visit: https://www.mygov.in/group-issue/inviting-ideas-mann-ki-baat-prime-minister-narendra-modi-29th-december-2024/
Hashtags
@MyGovCoronaNewsdesk · Post #13219 · 28.07.2024 г., 04:53
Tune in to 112th Episode of #MannKiBaat by PM Narendra Modi at 11 AM onwards! 🔗https://www.youtube.com/live/0NNhOh2XLg4?si=H9LRqQxSAFmIW6ld
Hashtags
@MyGovCoronaNewsdesk · Post #13209 · 12.07.2024 г., 08:59
In the latest episode of #MannKiBaat, PM Narendra Modi shared the inspiring story of Karthumbhi Umbrella from Kerala. Crafted by women entrepreneurs, these umbrellas are part of a larger initiative including a bamboo handicraft unit. This effort highlights the 'Vocal for Local' initiative and supports the tribal community of Attappady. Full Story: https://youtube.com/watch?v=CGWUrN8fcdQ Do you have any similar inspiring stories? Submit them for this month's episode! Visit: https://mygov.in/group-issue/inviting-ideas-mann-ki-baat-prime-minister-narendra-modi-28th-july-2024/
Hashtags
@MyGovCoronaNewsdesk · Post #13074 · 28.01.2024 г., 05:14
Tune in to the 109th episode of #MannKiBaat with PM Narendra Modi today at 11 AM. WATCH LIVE: https://www.youtube.com/watch?v=6NWEhOANvjE
Hashtags
@MyGovCoronaNewsdesk · Post #12780 · 28.05.2023 г., 12:43
#MannKiBaat
Hashtags
@MyGovCoronaNewsdesk · Post #12778 · 28.05.2023 г., 10:42
#MannKiBaat
Hashtags