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

Резултати

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

Пребарај: #ophiuchus

当前筛选 #ophiuchus清除筛选
Universe Mysteries 🪐

@cosmomyst · Post #26 · 30.07.2025 г., 01:51

🪐 Hidden over 430 light-years away in the constellation Ophiuchus, the protoplanetary disk around the young star AS 209 is riddled with striking gaps and rings thought to be carved by newly forming planets. ALMA observations revealed the disk’s outermost gap may be created by a planet similar in mass to Neptune, astonishing astronomers because it would be forming over 200 astronomical units from its star—far beyond the realms where planets are usually born. ✨ #protoplanets⚡#ALMA⚡#Ophiuchus 👉subscribe Universe Mysteries

Universe Mysteries 🪐

@cosmomyst · Post #193 · 26.08.2025 г., 16:11

🪐 The black hole MAXI J1820+070, about 10,000 light-years away in the constellation Ophiuchus, is known for its rapid and dramatic changes in brightness. These "black hole outbursts" happen when the black hole pulls in matter from a companion star, causing huge X-ray flares as the material heats up and spirals inward—revealing just how active and unpredictable these cosmic giants can be. ✨ #blackhole⚡#xray⚡#Ophiuchus⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries ​

Universe Mysteries 🪐

@cosmomyst · Post #456 · 25.10.2025 г., 12:21

🪐 A rogue planet called ISO-Oph 98, discovered in the Ophiuchus star-forming region about 475 light-years from Earth, is so light it’s only about 0.6% the mass of our Sun—closer to a giant planet than to a star. Unlike most planets, rogue planets like ISO-Oph 98 drift through space without orbiting any star, shining faintly with their own leftover heat rather than reflecting sunlight. ✨ #rogueplanets⚡#starformation⚡#Ophiuchus⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #530 · 30.11.2025 г., 22:21

🪐 The magnetar 1RXS J170849.0–400910, located about 18,000 light-years away in the constellation Ophiuchus, is known for its titanic magnetic field, which can reach over 100 trillion times the strength of Earth's. This intense magnetism is so powerful that it can twist the star's crust, triggering sudden bursts of X-rays and gamma rays—brief flashes that outshine entire regions of space before fading into darkness. ✨ #magnetar⚡#Xrays⚡#Ophiuchus⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​