TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #424 · 13 апр.

Стандартная библиотека asyncio это стандарт (начиная с Py3.4) для работы с асинхронным кодом. Но эта библиотека достаточно низкоуровневая, со своими проблемами, устаревшими подходами. Чтобы исправить это, были созданы разные обертки и альтернативы с реализацией популярных инструментов и паттернов асинхронного программирования. Это такие библиотеки как: - trio: улучшает корректность выполнения, не оставляя потерянных корутин при ошибках, то есть предлагает Structured Concurrency из коробки. - curio: упрощение синтаксиса и читаемости кода, больше похоже на работу с потоками. - anyio: универсальная обертка над asyncio или trio плюс множество вспомогательных инструментов. anyio используется в FastAPI как основная библиотека для работы с асинхронным кодом и вызовом синхронного кода из асинхронного. В общем, рекомендую почитать про возможности anyio, возможно вы более не будете использовать чистый asyncio в своих проектах) Это совсем не значит что дефолтный asyncio плох, он тоже даёт достаточный для работы функционал и продолжает развиваться. Например, в версии 3.11 появились TaskGroup, с похожим на trio функционалом. Так что он тоже актуален, просто придется больше написать кода самостоятельно. #libs#async

Hashtags

Резултати

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

Пребарај: #vivektavinita

当前筛选 #vivektavinita清除筛选
Pensive|

@PensivePost · Post #5848 · 08.07.2022 г., 21:06

I rushed down stairs. The wild energy around her was affecting me. Not only affecting me but turning me into the perfect dumbass. So I thought its good idea if I catch up with my buddy before a vapourising. Reaching on the last step, I looked up at the direction of my room. One second... What she is doing in my room? Rubbing the temple of my head, I dismiss all the cascading thoughts and marched towards the kitchen. "Oww, Holy hell" One second I was marching with my head held high and now I was embracing the pavement. Wow just great. I haven't been this lucky in my whole life. And suddenly I was showered with the God's grace. And I don't think I like it. "Sir...what are you doing on the floor" A very confused Lola, inquired with the bucket that she just emptied on me "I'm kissing the floor, Lola" I replied politely, well my system is shaken now, especially the one which is responsible for my emotions and feelings. "How did you fell ?" Vivek asked in very concerned voice, rushing to me. "No Vivek sir he is not fallen, he is just kissing the floor" Lola beamed from somewhere and I didn't even had energy to facepalm. " And why you are wet?" He inquired " Ohh wow he talks " My lips formed in knowing smile, well it's more like a grin. Actually I was just taunting him. for turning my life upside down. A if it wasn't already. "Yeah sir he talks very much and politely" She beamed again from somewhere and I couldn't do anything more than sighing "Why you are wet? " Vivek asked again ignoring Lola. He is really good in ignoring people. "It's God's grace in liquid form" I murmured, sinking my body in floor. "No sir I just dropped water on him that I was using for cleaning" Stupid woman chirped again, it's better if she murders herself because I will do it brutally and she won't like it, I don't even need to say how ruthless I'm, That idiot doesn't know when to use her mouth and mind, but I'm not even sure if she has mind. #Vivektavinita#Review#paragraph#novel