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 слични објави

Пребарај: #binaries

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

@cosmomyst · Post #621 · 14.01.2026 г., 12:21

🪐 Deep in the constellation Draco lies the pulsar PSR J2222−0137, a unique spinning neutron star about 900 light-years from Earth that forms a binary system with a faint white dwarf. PSR J2222−0137 spins once every 33 milliseconds, and its partner is one of the coolest known white dwarfs, so cold that its surface may be made of crystallized oxygen—offering a rare glimpse of two extreme stellar remnants circling each other in quiet cosmic partnership. ✨ #pulsars⚡#binaries⚡#neutronstars⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #450 · 23.10.2025 г., 22:21

🪐 The star AR Scorpii, located about 380 light-years away in the constellation Scorpius, is an unusual binary system where a rapidly spinning white dwarf blasts powerful beams of energy at its red dwarf companion. Unlike typical stars, AR Scorpii pulses in visible light and radio waves every two minutes as its magnetic field accelerates particles, making it the first known "white dwarf pulsar" in our galaxy. ✨ #unusualstars⚡#binaries⚡#pulsars⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #431 · 16.10.2025 г., 12:21

🪐 The star VFTS 352, located in the Tarantula Nebula about 160,000 light-years away, is actually two massive stars orbiting each other so closely that their outer layers touch—creating a rare "overcontact binary." This unusual system is on the verge of merging, and both stars are so hot and bright that their shared atmosphere fuses them together, making VFTS 352 one of the most extreme examples of stellar partnership ever found. ✨ #unusualstars⚡#binaries⚡#TarantulaNebula⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #60 · 02.08.2025 г., 03:11

🪐 The exoplanet Kepler-16b orbits not one, but two stars, forming a real-life counterpart to a Tatooine-like world in the constellation Cygnus. This Saturn-sized planet experiences double sunrises and sunsets as it circles both its orange and red dwarf hosts, creating a celestial theater found nowhere in our own solar system. ✨ #exoplanets⚡#binaries⚡#kepler⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries