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 слични објави

Пребарај: #epiphany

当前筛选 #epiphany清除筛选
Addis Standard

@addisstandardeng · Post #21111 · 19.01.2026 г., 10:21

In_Pictures: #Epiphany celebrations across #Ethiopia Epiphany (Timket) celebrations are taking place across Ethiopia, as followers of the Ethiopian Orthodox Tewahedo Church mark the festival in accordance with long-standing religious traditions. Observances began on the eve of the Katara ceremony yesterday, with clergy and congregants participating in the commemoration. Photo: Social media

Google Facts™ [ ️@googlefactss🌎]

@googlefactss · Post #40485 · 06.01.2026 г., 03:04

January 6 is Epiphany or Theophany. Wise Men, or magi, visited baby Jesus with gifts: gold, frankincense, and myrrh. The Bible doesn’t say how many magi came or their names; tradition says three: Melchior, Caspar, and Balthazar. Some churches also celebrate Jesus’ baptism this day. Before December 25 was Christmas, January 6 was the main day to celebrate Jesus’ birth. It ends the 12 days of Christmas with food, parades, and gifts. ✝️🎁⭐ [Read more] We wish you all a happy Epiphany day. @googlefactss#Epiphany#Jesus#Christmas#ChristianTraditions#History

☦️Epiphany and the Cross-Diving Tradition On the feast of the Epiphany, believers in a number of countries take part in a folk-religious tradition known as cross diving. 🔹 After the blessing of the water, a priest throws a cross into a body of water — a river, lake, or the sea. 🔹 Participants then swim to retrieve the cross from the water. 🔹 It is believed that the person who retrieves the cross first receives a special blessing for the year ahead. 🌍 This tradition is especially common in countries with a warmer climate than Russia, such as Greece, Bulgaria, Serbia, as well as in several other countries and regions. 🇷🇺🇿🇦 This tradition is also practiced within the Russian-speaking diaspora in South Africa. 📸Photo (Cape Town) 🔗Source: https://t.me/Capetown_SouthAfrica_chat/50655 #Epiphany#Orthodoxy#ChristianTraditions#Culture#Religion#FolkTraditions#SouthAfrica#CapeTown

Addis Standard

@addisstandardeng · Post #21118 · 19.01.2026 г., 13:37

In Pictures 2 #Ethiopians across the country celebrate Timket (#Epiphany)—recognized by #UNESCO as an intangible cultural heritage of humanity—one of the Ethiopian Orthodox Church’s most sacred festivals, marked by vibrant processions, prayers, and communal gatherings. On the occasion of the festival, various embassies in Addis Abeba have extended congratulatory messages. The embassies of #Russia and the #United_States, along with those of #Germany, the #Netherlands, the #United_Kingdom, #Switzerland, #Sweden, #Finland, #Israel, #Armenia, #Canada, #Iran, #Pakistan, and #Australia, wished Ethiopians a peaceful and joyful celebration. (Source: FBC, TigTV)