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

TGINSIGHT SIMILAR POSTS

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

Изворен канал @pythonotes · Post #199 · 8 јан.

Многие из тех кто активно работал с Python2 несколько удивлены, почему в Python3 удобная функция reload() переехала из builtin в imp а потом и в importlib? Ну было же удобно! А теперь лишний импорт😖 Дело в том, что начиная с Python3.3 функция reload() переписана на Python вместо Cи. Что это нам даёт? 🔸 Такой код проще поддерживать и развивать 🔸 Python код легче читать, изучать и понимать. Сравните это ➡️ и это ➡️. 🔸 Как результат пункта 2, проще писать свои расширения импорта. Например, пользовательский импортёр с какой-либо хитрой логикой по аналогии с импортом из zip архивов. А есть ли у этого решения недостатки? Да, они всегда есть. 🔹 Так как это не builtin функция, её следует импортнуть перед использованием 🔹 Скорость замедлилась примерно на 5%. Очевидно, что это совершенно не критично. К тому же от версии к версии логика импорта будет оптимизироваться и ускоряться. В самом начале файла importlib/__init__.py мы видим такой импорт: import _imp # Just the builtin component, NOT the full Python module То есть часть функционала по прежнему написана на Си, но достаточно низкоуровневая. #basic

Hashtags

Резултати

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

Пребарај: #bennu

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

@cosmomyst · Post #25 · 30.07.2025 г., 01:00

🪐 In the constellation Ophiuchus, the asteroid 101955 Bennu harbors boulders on its surface that are actually fragments from a much larger parent asteroid, dislodged by ancient cosmic impacts. Analysis of samples returned by NASA’s OSIRIS-REx mission revealed minerals that interacted with liquid water billions of years ago, revealing Bennu as a time capsule from the dawn of the solar system. ✨ #Bennu⚡#asteroids⚡#OSIRISRex 👉subscribe Universe Mysteries

Universe Mysteries 🪐

@cosmomyst · Post #338 · 27.09.2025 г., 18:21

🪐 One of the most intriguing potentially hazardous asteroids is (101955) Bennu, a 500-meter-wide space rock that approaches Earth every six years. Bennu's orbit is so well-studied that NASA sent the OSIRIS-REx mission to collect samples, as even small forces—like sunlight changing its spin—can alter its path, making Bennu a prime real-world example of why scientists keep a close watch on these cosmic wanderers. ✨ #asteroids⚡#hazard⚡#Bennu⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #290 · 18.09.2025 г., 09:40

🪐A skyscraper-sized space rock is on its way past Earth. On September 18, 2025, asteroid 2025 FA22, measuring up to 300 meters across, will sweep by our planet. At its closest, it will be about 835,000 km away — more than twice the distance to the Moon. Moving at a breathtaking 34,000 km/h, this Apollo-type asteroid silently follows its orbit around the Sun, crossing Earth’s path in space. The flyby will peak around 07:41 UTC, a moment astronomers worldwide are watching closely. Massive, fast, and ancient — yet passing safely by. Encounters like this remind us how close cosmic giants can come, while still leaving Earth untouched. ✨ #asteroids⚡#hazard⚡#Bennu⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries

Universe Mysteries 🪐

@cosmomyst · Post #231 · 06.09.2025 г., 13:11

🪐 The asteroid Bennu, about 500 meters wide, orbits the Sun and regularly passes close to Earth—so close that it’s classified as a “potentially hazardous asteroid.” Scientists continually monitor Bennu’s path because even small shifts caused by sunlight (known as the Yarkovsky effect) could alter its future trajectory, making it one of the most closely watched objects to help protect our planet from possible impacts. ✨ #asteroid⚡#hazards⚡#Bennu⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries ​

Universe Mysteries 🪐

@cosmomyst · Post #432 · 16.10.2025 г., 15:21

🪐 One of the closest ongoing space threats to Earth is asteroid (101955) Bennu, a 500-meter-wide rock whose orbit brings it near our planet about every six years. Bennu's path is carefully tracked because even small gravitational nudges or sunlight (the Yarkovsky effect, where heat causes tiny pushes) could change its future route, making it a real-world example of why scientists keep a vigilant watch on these near-Earth objects. ✨ #asteroids⚡#defense⚡#Bennu⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​