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

TGINSIGHT SIMILAR POSTS

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

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

Подразумеваемые неймспейсы или неявные пакеты. Этот функционал добавлен в Python 3.3 Что он означает? Ранее, до 3.3 пакетами считались лишь директории, в которых есть файл __init__.py. Этот файл одновременно являлся свидетельством того, что директория это Python-пакет, и служил "телом" этого пакета. То есть местом, где можно написать код, как это делается внутри модуля. Этот код исполняется в момент импорта пакета, так что его принято называть "код инициализации пакета". Начиная с версии 3.3 Любая директория считается пакетом и Python будет пытаться использовать любую директорию для импорта. Конечно, не любую в файловой системе, а только те что находятся в sys.path. Это значит, что теперь __init__.py нужно делать только если: 🔸 вам требуется создать код инициализации пакета 🔸 нужна совместимость со старыми версиями Python На мой взгляд это немного упрощает разработку, делает её чище, но с другой стороны убивает некоторую однозначность происходящего. Например, я создал репозиторий со своей библиотекой и рядом положил код примеров или тестов. repo_name/ my_library/ __init__.py main.py examples/ exam1.py exam2.py В этом репозитории пакетом является только my_library, остальные директории это не пакеты, это просто дополнительный код в файлах. Директория examples не добавлена в sys.path, в ней нет рабочих модулей. Но если она лежит рядом с my_library, то Python вполне сможет импортнуть из неё модули, так как посчитает что examples это валидный пакет. Конечно, пример несколько надуманный. Никто не будет добавлять корень репозитория в sys.path. Но, я думаю, суть ясна. Иногда директория это просто директория а не пакет! #basic#pep

Hashtags

Резултати

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

Пребарај: #karst

当前筛选 #karst清除筛选
Amazing Geography 🌍

@amazingeo · Post #577 · 15.01.2026 г., 12:31

🌍 Slovenia’s Škocjan Caves feature an underground canyon over 100 meters deep—the largest in Europe. This karst wonder drains rivers directly from the surface into vast hidden chambers. ✨ #caves⚡#karst⚡#geology⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography 👉more Channels ​

Amazing Geography 🌍

@amazingeo · Post #275 · 20.09.2025 г., 22:31

🌍 In Croatia’s Dinaric Alps, karst landscapes hide more than 10,000 known caves and sinkholes. Some systems stretch for over 20 kilometers underground, hosting rare, blind aquatic animals. ✨ #caves⚡#karst⚡#geology⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography🌍 ​

Amazing Geography 🌍

@amazingeo · Post #236 · 14.09.2025 г., 16:12

🌍 The world’s largest cave chamber by volume, Sarawak Chamber in Borneo, is big enough to hold 40 jumbo jets. This massive cavern formed naturally in a karst limestone landscape. ✨ #caves⚡#karst⚡#geology⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography🌍 ​

Amazing Geography 🌍

@amazingeo · Post #196 · 08.09.2025 г., 00:12

🌍 Vietnam’s Phong Nha Cave features tunnels over 44 kilometers long, with underground rivers and rare cave pearls—smooth mineral balls formed by dripping water in the dark. ✨ #caves⚡#karst⚡#geology⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography🌍 ​

Amazing Geography 🌍

@amazingeo · Post #162 · 02.09.2025 г., 13:12

🌍 Some karst caves hold unique stone towers called "speleothems," which form slowly from dripping water. These underground forests can grow over tens of thousands of years. ✨ #caves⚡#karst⚡#geology⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography🌍 ​

Amazing Geography 🌍

@amazingeo · Post #124 · 27.08.2025 г., 03:12

🌍 Caves in karst landscapes can grow huge underground chambers thanks to rainwater slowly dissolving limestone rock. Some contain rare crystals and underground rivers hidden from the surface. ✨ #caves⚡#karst⚡#geology⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography🌍 ​

Amazing Geography 🌍

@amazingeo · Post #504 · 09.12.2025 г., 20:31

🌍 Rainwater can carve entire underground labyrinths in karst landscapes, creating vast networks of caves, tunnels, and sinkholes—some so deep and complex that new passages are still being found today. ✨ #caves⚡#karst⚡#erosion⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography 👉more Channels ​

Amazing Geography 🌍

@amazingeo · Post #316 · 30.09.2025 г., 18:31

🌍 Some of the world’s longest underground rivers are hidden in karst landscapes. These rivers can travel for dozens of kilometers beneath the surface before emerging in springs or caves. ✨ #caves⚡#karst⚡#hydrology⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography 👉more Channels ​

Amazing Geography 🌍

@amazingeo · Post #657 · 10.03.2026 г., 20:31

🌍 Mexico’s Yucatán Peninsula hides thousands of cenotes—natural sinkhole pools formed when limestone caves collapse, revealing crystal-clear groundwater once sacred to ancient Maya. ✨ #caves⚡#karst⚡#groundwater⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography 👉more Channels ​

Amazing Geography 🌍

@amazingeo · Post #615 · 05.02.2026 г., 20:31

🌍 The world’s largest karst region is in southern China, where vast limestone hills, towers, and deep caves house rare species found nowhere else on Earth, including blind fish and giant salamanders. ✨ #karst⚡#caves⚡#limestone⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography 👉more Channels ​

Amazing Geography 🌍

@amazingeo · Post #536 · 25.12.2025 г., 20:31

🌍 In Croatia’s Velebit Mountains, karst landscapes feature underground streams that vanish into deep sinkholes, only to reappear as powerful springs many kilometers away. ✨ #karst⚡#caves⚡#springs⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography 👉more Channels ​

Amazing Geography 🌍

@amazingeo · Post #469 · 22.11.2025 г., 12:31

🌍 Some karst caves contain rare bacteria that feed on mineral rock, creating colorful biofilms and even helping form new cave crystals—making the underground world alive in ways few people expect. ✨ #caves⚡#karst⚡#microbiology⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography 👉more Channels ​

12
ПретходнаСтраница 1 од 2Следна