@social_justice_watch · Post #17881 · 09.02.2023 г., 17:47
Sorry for what, exactly? 👀#Autism#autistic#ActuallyAutistic#AutismAcceptance#AutismAcceptancesource
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
Пребарај: #autistic
@social_justice_watch · Post #17881 · 09.02.2023 г., 17:47
Sorry for what, exactly? 👀#Autism#autistic#ActuallyAutistic#AutismAcceptance#AutismAcceptancesource
@social_justice_watch · Post #17904 · 09.02.2023 г., 18:42
Betcha it would improve accessibility AND accuracy. Just sayin'. #Autism#autistic#ActuallyAutistic#autistictwittersource
@social_justice_watch · Post #18048 · 28.04.2023 г., 14:30
Gets me going every time. #Autism#autistic#ActuallyAutistic#pathologicaldemandavoidancesource
@social_justice_watch · Post #18054 · 02.05.2023 г., 19:17
It’s only a real choice if it’s a fully informed one. Identity First Language = Autistic person, am/is Autistic Person First Language = person with Autism, have/has Autism #autism#autistic#ActuallyAutistic#Autisticmemessource
@social_justice_watch · Post #17919 · 14.02.2023 г., 16:55
Maybe you’re not doing it wrong, you just haven’t found someone who gets you yet. ❤️ #Autism#autistic#ActuallyAutistic#autistichumorsource
@social_justice_watch · Post #17905 · 09.02.2023 г., 18:44
And this is one of the many reasons why self-identification is a thing. (Applicable to ADHDers as well.) #Autism#autistic#ActuallyAutistic#ADHD#AuDHDsource
@social_justice_watch · Post #18016 · 05.04.2023 г., 18:45
You can’t win, so why give them any of your f@cks? 😉 #autism#Autistic#ActuallyAutistic#AutismAcceptance#AutismAwarenesssource
@social_justice_watch · Post #18035 · 18.04.2023 г., 22:21
Actual footage. #pathologicaldemandavoidance#pervasivedriveforautonomy#autistic#ActuallyAutisticsource
@social_justice_watch · Post #18119 · 29.06.2023 г., 04:39
For some reason, even people who understand the importance of representation for other groups can struggle to apply the same logic to Autistic (and otherwise disabled) people. <cough cough #ableism> #autistic#ActuallyAutistic#nothingaboutuswithoutussource
@social_justice_watch · Post #18060 · 09.05.2023 г., 21:39
If your first instinct is to dismiss this on the grounds of “but that would be really messed up,” you’re about halfway to the point. Keep going. #Autism#autistic#ActuallyAutistic#AutismAcceptance#appliedbehavioranalysissource
@social_justice_watch · Post #17909 · 09.02.2023 г., 19:02
CW: ABA, signs of trauma. I don’t normally do content warnings, but ngl: this one just hurts. Take care of yourself and scroll on by if you’re not in the right space for it. (And I promise I’ll make it up to you next week.) #Autism#Autistic#ActuallyAutistic#ABA#banABAsource
@social_justice_watch · Post #17968 · 07.03.2023 г., 22:50
Ableist stereotypes are bullshit. Also, we know our neurokin when we see them. 👀😉 #Autism#autistic#ActuallyAutistic#AuDHD#Neurodivergent#AutismAcceptancesource