@wallcrafts_m · Post #342 · 08.12.2024 г., 10:31
#wallpaper#volcano
Hashtags
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
Пребарај: #volcano
@wallcrafts_m · Post #342 · 08.12.2024 г., 10:31
#wallpaper#volcano
Hashtags
@bestwallpapes · Post #3807 · 25.12.2025 г., 05:53
@Bestwallpapes #Volcano#Landscape
Hashtags
@depthwallpaper · Post #202 · 30.12.2022 г., 12:16
Hi-Res 🌋 #hres#nature#volcano
@bestwallpapes · Post #2798 · 13.08.2024 г., 08:12
@Bestwallpapes #Volcano#Colorful
@interesting_planet_facts · Post #1294 · 15.02.2026 г., 12:11
🌎 On August 24, 79 CE, Mount Vesuvius erupted violently, burying the Roman cities of Pompeii and Herculaneum in volcanic ash. This sudden eruption killed thousands and preserved entire towns under meters of ash, offering archaeologists rare insight into daily Roman life. ✨ #volcano⚡#archaeology⚡#history 👉subscribe Interesting Planet 👉more Channels
Hashtags
@Wallpaper_Prime · Post #23404 · 15.12.2025 г., 09:03
#вулкан#volcano ⭐️ «Wallpaper Prime» ⭐️
@interesting_planet_facts · Post #1079 · 27.11.2025 г., 22:11
🌎 In 1816, a year after the Tambora volcano erupted in Indonesia, much of the world experienced a “Year Without a Summer.” Temperatures dropped globally, causing widespread crop failures and food shortages. Snow fell in June in parts of North America and Europe, and some regions lost up to 75% of their harvests. ✨ #volcano⚡#climate⚡#history 👉subscribe Interesting Planet 👉more Channels
@bestwallpapes · Post #3104 · 30.11.2024 г., 12:21
@Bestwallpapes #Volcano#Lava
@interesting_planet_facts · Post #1333 · 08.03.2026 г., 12:11
🌎 A massive volcanic eruption at Lake Toba in Indonesia about 74,000 years ago was one of Earth’s largest known explosions. The eruption released so much ash that it may have triggered a global volcanic winter, cooling the planet and affecting early human populations. Its crater now forms Lake Toba, the world’s largest volcanic lake at about 100 kilometers long. ✨ #volcano⚡#catastrophe⚡#history 👉subscribe Interesting Planet 👉more Channels
Hashtags
@interesting_planet_facts · Post #803 · 23.09.2025 г., 18:11
🌎 The 1902 eruption of Mount Pelée on Martinique destroyed the city of Saint-Pierre within minutes, killing over 28,000 people. It is the deadliest volcanic disaster of the 20th century. ✨ #volcano⚡#catastrophe⚡#history 👉subscribe Interesting Planet 👉more Channels
Hashtags
@interesting_planet_facts · Post #770 · 17.09.2025 г., 20:22
🌎 The Toba supereruption in Indonesia about 74,000 years ago was one of the largest volcanic events in the last 2 million years. It ejected 2,800 cubic kilometers of material, triggered a global volcanic winter, and may have caused a dramatic human population decline, as shown by genetic studies indicating a bottleneck in human evolution. ✨ #volcano⚡#history⚡#catastrophe 👉subscribe Interesting Planet
Hashtags
@interesting_planet_facts · Post #736 · 12.09.2025 г., 18:22
🌎 The 1883 eruption of Krakatoa was one of the most violent volcanic events in recorded history. It unleashed explosive blasts heard 3,000 kilometers away, generated giant tsunamis, and ejected ash high into the atmosphere—causing global temperatures to drop and vivid sunsets worldwide for years after. ✨ #volcano⚡#catastrophe⚡#history 👉subscribe Interesting Planet
Hashtags