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

Резултати

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

Пребарај: #climatescience

当前筛选 #climatescience清除筛选
Les Flashs Météo 气象追踪

@chinaweatherinfomationupdate · Post #227339 · 18.05.2026 г., 15:38

Honored by Prof. Hiroshi Takahashi's generosity in sharing his AAS Review Paper on land-surface influences on Asian monsoon precipitation and recommending the full special issue. Grateful for such support in advancing #climatescience ! Explore his study: https://link.springer.com/article/10.1007/s00376-026-5209-3#AAS via @aasjournal.bsky.social - Adv. Atmos. Sci.

Les Flashs Météo 气象追踪

@chinaweatherinfomationupdate · Post #227338 · 18.05.2026 г., 15:27

At the Ocean-Monsoon Conference 2026, @agturnermonsoon.bsky.social of the University of Reading presented a striking visual: the same location in India, captured under drought and active monsoon conditions. Two extremes. One region. A powerful reminder of what is at stake. 🧵👇#AAS#Climatescience via @aasjournal.bsky.social - Adv. Atmos. Sci.

IELTS|Newspapers & Magazines|English

@emagzinewspars · Post #9628 · 26.11.2025 г., 12:32

#Scientific_American🇺🇸📕[PDF]⬇️ #December2025 #Monthly_Magazines For learning, for free(dom). @backupofmagazines NASA faces a stalled Mars sample-return mission as funding reshapes priorities in #TechPolicy, while a promising mRNA-based personalized cancer vaccine struggles amid shrinking research budgets in the U.S., underscoring a rising #HealthCrisis. Scientists also warn that deepfakes demand new “face-ownership” rights, adding momentum to global #AIRegulation. Fresh insights into black-hole limits and rare-earth formation expand our cosmic and geologic imagination, even as #ClimateScience pushes oil and gas giants to pivot toward plastics. New antidepressant treatments and studies on small daily joys highlight a parallel #MentalHealth shift across society.

IELTS|Newspapers & Magazines|English

@emagzinewspars · Post #9633 · 26.11.2025 г., 12:32

#The_National_Geographic🇺🇸📕[PDF]⬇️ #December2025 #Monthly_Magazines For learning, for free(dom). @backupofmagazines This issue captures a world in transition, from ancient engineering puzzles to the fragile future of memory. Stunning visuals highlight global migration, ecological risk and cultural resilience, while scientists push deeper into #ClimateScience and #Neuroscience. A precise Mesopotamian map surprises historians, and a tribute to Jane Goodall reflects on her transformative legacy in #WildlifeResearch. The “Pictures of the Year” series showcases unforgettable scenes shaped by conflict, migration and #GlobalCulture. As melting ice reveals prehistoric secrets, explorers race against time, reminding us how fragile our world is in the age of #EarthChange and #FutureTech.

IELTS|Newspapers & Magazines|English

@emagzinewspars · Post #9391 · 21.10.2025 г., 08:58

#The_Science🇺🇸📕[PDF]⬇️ 16 #October2025 #Weekly_Magazines For learning, for free(dom). @backupofmagazines This week’s Science dives deep into the frontiers of #Nanoscopy, visualizing neural circuits with stunning 3D precision. From Arctic #Permafrost preserving ancient RNA viruses to #Ant colonies evolving architectural immunity, the issue spans from the microscopic to the planetary. Groundbreaking work tracks #SeaLevel change over 4.5 million years and explores durable #Hydrogen production membranes and electric control in #2Dmaterials. The “#ColdStorage” feature warns of hidden viral archives in melting ice—a chilling insight into #ClimateScience and future pandemics. A visionary issue linking biology, chemistry, and global sustainability through the lens of innovation.