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

Резултати

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

Пребарај: #lithosphere

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

@amazingeo · Post #18 · 10.08.2025 г., 10:27

🌍 The lithosphere’s tectonic plates move slowly, but sometimes collide to form tall mountain ranges like the Himalayas, linking Earth's rocky shell to the atmosphere and biosphere. ✨ #lithosphere⚡#tectonics⚡#mountains⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography🌍

Amazing Geography 🌍

@amazingeo · Post #644 · 22.02.2026 г., 12:31

🌍 The biosphere reaches from deep ocean trenches to high mountain peaks, supporting life almost everywhere—even microbes live in extreme environments far below Earth's surface or high in the clouds. ✨ #biosphere⚡#lithosphere⚡#atmosphere⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography 👉more Channels ​

Amazing Geography 🌍

@amazingeo · Post #381 · 16.10.2025 г., 20:31

🌍 The biosphere is found in surprising places—microbes thrive in clouds high in the atmosphere and deep within the lithosphere’s rocks, connecting all Earth’s spheres in unexpected ways. ✨ #biosphere⚡#lithosphere⚡#atmosphere⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography 👉more Channels ​

Amazing Geography 🌍

@amazingeo · Post #687 · 11.04.2026 г., 20:31

🌍 The lithosphere, atmosphere, hydrosphere, and biosphere constantly exchange matter—volcanic eruptions can shoot minerals into the air that later fall into oceans, nourishing marine life far away. ✨ #lithosphere⚡#atmosphere⚡#hydrosphere⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography 👉more Channels ​

Amazing Geography 🌍

@amazingeo · Post #565 · 09.01.2026 г., 12:31

🌍 When huge dust storms sweep across deserts, fine particles from the lithosphere reach the atmosphere, circle the globe, and even fertilize distant rainforests—linking Earth’s spheres in invisible ways. ✨ #lithosphere⚡#atmosphere⚡#hydrosphere⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography 👉more Channels ​

Amazing Geography 🌍

@amazingeo · Post #492 · 03.12.2025 г., 20:31

🌍 A single major volcanic eruption links all of Earth’s spheres—rock and magma from the lithosphere, gas and ash in the atmosphere, water vapor in the hydrosphere, and rapid changes in the biosphere. ✨ #lithosphere⚡#atmosphere⚡#hydrosphere⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography 👉more Channels ​

🧠 Building intelligent foundations for Web4. Lithic enables AI-native smart contracts — combining intelligent execution, programmable logic, and decentralized coordination in one unified layer. From verifiable AI workflows to scalable infra, this is the next evolution of onchain systems. Read more 🔍https://lnkd.in/gsez6_GK Post 🔍https://www.linkedin.com/posts/kaj-labs_lithosphere-lithic-artificialintelligence-activity-7442707365570916352-XBZX/ Website 🌐https://lithic.at/ #Lithosphere#Lithic#Web4#AI#Crypto

Amazing Geography 🌍

@amazingeo · Post #525 · 20.12.2025 г., 12:31

🌍 The hydrosphere holds less than 0.01% of Earth's water in rivers and lakes, while most is locked in glaciers, ice caps, or underground. These hidden reserves link all of Earth’s spheres. ✨ #hydrosphere⚡#lithosphere⚡#biosphere⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography 👉more Channels ​

Amazing Geography 🌍

@amazingeo · Post #45 · 14.08.2025 г., 03:12

🌍 The deepest part of the ocean, the Mariana Trench, reaches nearly 11,000 meters below sea level. Here, the hydrosphere, lithosphere, and biosphere all meet in extreme conditions. ✨ #hydrosphere⚡#lithosphere⚡#biosphere⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography🌍

Amazing Geography 🌍

@amazingeo · Post #36 · 11.08.2025 г., 13:12

🌍 The deepest point on land, the Dead Sea Depression, lies about 430 meters below sea level, linking the lithosphere, atmosphere, hydrosphere, and biosphere in an extreme environment for life. ✨ #lithosphere⚡#hydrosphere⚡#biosphere⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography🌍

Amazing Geography 🌍

@amazingeo · Post #456 · 15.11.2025 г., 20:31

🌍 Some bacteria and fungi live deep in rocks of the lithosphere, far below where sunlight reaches. These life forms connect the biosphere to Earth's rocky layer in ways once thought impossible. ✨ #lithosphere⚡#biosphere⚡#microbes⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography 👉more Channels ​

Amazing Geography 🌍

@amazingeo · Post #262 · 19.09.2025 г., 00:12

🌍 Earth’s spheres aren’t fixed—they overlap at microbe level. Extremophiles, tiny life forms, live deep underground rocks, linking the biosphere to the lithosphere in some of Earth's harshest zones. ✨ #lithosphere⚡#biosphere⚡#microbes⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography🌍 ​

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