@sgmrt · Post #2524 · 26.12.2025 г., 00:14
[NSL] CLEARED: Train services from #AngMoKio to #Woodlands have resumed. Free regular bus service has ended. - SMRT
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
Пребарај: #angmokio
@sgmrt · Post #2524 · 26.12.2025 г., 00:14
[NSL] CLEARED: Train services from #AngMoKio to #Woodlands have resumed. Free regular bus service has ended. - SMRT
Hashtags
@sgmrt · Post #2523 · 25.12.2025 г., 23:59
[NSL] UPDATE: Train services from #AngMoKio to #Woodlands are progressively being restored. Free regular bus service is still available between #AngMoKio and #Woodlands. - SMRT
Hashtags
@sgmrt · Post #1651 · 22.02.2023 г., 02:55
[NSL] Update : Due to a train fault, pls add 25mins train travel time btwn #Woodlands and #AngMoKio. Free regular bus svcs is available btwn #Woodlands and #AngMoKio. Our station staff will assist. - SMRT
Hashtags
@sgmrt · Post #1650 · 22.02.2023 г., 02:55
[NSL] Update : Due to a train fault, pls add 25mins train travel time btwn #Woodlands and #AngMoKio. Free regular bus svcs is available btwn #Woodlands and #AngMoKio. For alternative travel options, please take TEL or refer to https://bit.ly/3sUuPup. - SMRT
Hashtags
@sgmrt · Post #1649 · 22.02.2023 г., 02:26
[NSL] UPDATE: Free regular bus svcs is available between #Woodlands and #AngMoKio. Our station staff will assist. - SMRT
Hashtags
@sgmrt · Post #1648 · 22.02.2023 г., 02:26
[NSL]: Due to a train fault, pls add 15mins train travel time btwn #Woodlands and #AngMoKio. Free regular bus svcs is available btwn #Woodlands and #AngMoKio. Our station staff will assist. - SMRT
Hashtags
@sgmrt · Post #1647 · 22.02.2023 г., 02:26
[NSL]: Due to a train fault, pls add 25mins train travel time btwn #Woodlands and #AngMoKio. Free regular bus svcs is available btwn #Woodlands and #AngMoKio. Our station staff will assist. - SMRT
Hashtags
@sgmrt · Post #1522 · 18.10.2022 г., 22:32
[NSL] UPDATE: Due to a track fault, pls add 15mins train travel time btwn #AngMoKio and #Woodlands. Free regular bus & free bridging bus svcs btwn #AngMoKio and #Woodlands. - SMRT
Hashtags
@sgmrt · Post #1521 · 18.10.2022 г., 22:05
[NSL] UPDATE: : Due to a track fault, pls add 15mins train travel time btwn #AngMoKio and #Woodlands. Free regular bus & free bridging bus svcs btwn #AngMoKio and #Woodlands. - SMRT
Hashtags
@sgmrt · Post #1519 · 18.10.2022 г., 21:51
[NSL]: Due to a track fault, pls add 15mins train travel time btwn #AngMoKio and #Woodlands.: Free regular bus & free bridging bus svcs btwn #AngMoKio and #Woodlands. - SMRT
Hashtags
@sgmrt · Post #2238 · 06.02.2025 г., 22:44
[NSL] UPDATE: Due to a train fault, pls add 10mins travelling time from #AngMoKio to #JurongEast towards #JurongEast. Passenger can take alternate route via TEL. - SMRT
Hashtags
@sgmrt · Post #2235 · 06.02.2025 г., 22:14
[NSL] UPDATE: Due to a train fault, pls add 10mins travelling time from #AngMoKio to #JurongEast towards #JurongEast. Passenger can alternate route via TEL. - SMRT
Hashtags