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

Резултати

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

Пребарај: #telegramthursday

当前筛选 #telegramthursday清除筛选

It's 'Telegram Thursday' and I want to recommend interesting channels. Today I was recommended a pretty fine channel, which focuses on Paganism: https://t.me/s/pagan_revivalism @Pagan_Revivalism Check it out and share if you like the content! The second channel I enjoy to check out every now and then is this one: https://t.me/s/folkwisdom @folkwisdom Pretty interesting forwards sometimes, from accelerationism to white pills. #TelegramThursday @EuropeanTribalism

It's 'Telegram Thursday' and I want to recommend interesting channels. Today I want to point out a channel dedicated to Germanic topics with lots of own content: https://t.me/s/oakwhispers @oakwhispers Give the creator a chance and check it out! It's important that we have channels like this, which add own content instead of plain forwarding. #TelegramThursday @EuropeanTribalism

It is 'Telegram Thursday' and I want to recommend you interesting channels. Today I would like to recommend a couple of channels I regularly read. No, not just content skipping, but actually reflecting on the content: https://t.me/tribeofthefox https://t.me/GreekLeague https://t.me/folkwisdom https://t.me/skogarvordurinn Go ahead and check them out! #TelegramThursday @EuropeanTribalism

It is 'Telegram Thursday' and I want to recommend you interesting channels. Today I would like to point out the channel from a lad I know from the time I was still on Twitter: https://t.me/AureusPress There is art, neo-futurism and quite some gems to be found on this channel. So go and check it! #TelegramThursday @EuropeanTribalism

I am not sure if everybody is aware that you can access all Telegram channels without having Telegram installed. You want to visit your favourite channel @EuropeanTribalism over your web browser? Try this: https://t.me/s/EuropeanTribalism You want to share the fantastic articles from @solarcult? Try this: https://t.me/s/solarcult Want to read one of @morrigancarrick's memes? Just add a number, which is the article ID at the end. Try this: https://t.me/s/morrigancarrick/533 Share it with your Telegram-free friends! #TelegramThursday @EuropeanTribalism

It's 'Telegram Thursday' and I want to recommend you some interesting channels: @PrimordialPath - a very interesting channel with straightforward opinions and views. If you are into Folk Futurism, go and check it out! @Solarcult - a channel devoted to mythology, history and Aryan heritage. Definetly worth a follow. @VolkischShakti - this channel focuses on information about female deities. If you are into mythology, it's worth to read it. Be sure to share quality content when you find it! #TelegramThursday @EuropeanTribalism

It is 'Telegram Thursday' and I want to recommend you some interesting channels: @philosophicat, who also runs a youtube channel by this name, adds a very unique perspective to current happenings. Also check out her series on Evolas 'Revolt Against the Modern World'! @aryologia has lots of interesting content if you are interested in Indo-Aryan culture. @mythologicalfact focuses on Vedic content. If you want to extend your knowledge about ancient myths, be sure to give them a follow. @getthispdf is my channel for collecting interesting eBooks for the topics physics, spirituality and history. If you want a good read, check it out. Be sure to share quality content when you encounter it! #TelegramThursday @EuropeanTribalism

It's 'Telegram Thursday' and I want to recommend you interesting channels. Today marks the first of a series of recommendations, based on the various expressions of European culture. We start with a channel, which focuses on the Slavic aspect: https://t.me/THEOLDWAYS Have a look and follow! #Slavic#TelegramThursday @EuropeanTribalism

12
ПретходнаСтраница 1 од 2Следна