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

Резултати

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

Пребарај: #mentalgrowth

当前筛选 #mentalgrowth清除筛选

Hard work is a must thing for success. Smart work is not a substitute for hard work, it is another wing of the bird which can take you to your success. In short, there is no substitute for hard work! You have to be ready for it. Put everything you have for what you want, This is the way of massive success! Problems are going to be there always! Tackle them. You have only two choices, one is EXCUSES and other is RESULTS. The choice is yours! Don’t sacrifice your dreams for temporary pleasure. Neither this pleasure is going to come with you nor this pain. Choose temporary pain for your permanent happiness. ⭐️ Give your 100% (not even 99%) for your dreams! Don’t run away from hard work. Thisis going to give you your dreams! ✨💪 #mentalGrowth#ipersonalgrowths#smarwork#hardwork

Fear or opportunity? Fears are the body's adequate reaction to something new, to something that once caused unpleasant consequences, or to something that directly or indirectly threatens one's life. But there are fears that simply must be overcome. For example, if you have an idea, but to implement it, you do not have the courage, and therefore and perseverance. It is behind such fears that lies your invaluable potential. The body never generates ideas that it doesn't have the resources to implement. Our thoughts are not random. Think of the opportunities that will open up before you after you overcome your fear. Have you imagined it? Now act! Join us for more -> @ipersonalgrowths💡 #MentalGrowth #Fear #opportunity #psychologyinformation