Вторая по частоте future-функция, которую я использовал, это абсолютный импорт
from __future__ import absolute_import
Что она делает?
Изменения, которые вносит эта инъекция описаны в PEP328
Покажу простой пример.
Допустим, есть такой пакет:
/my_package
/__init__.py
/main.py
/string.py
Смотрим код в my_package/main.py
# main.py
import string
Простой пример готов) Вопрос в том, какой модуль импортируется в данном случае? Есть два варианта:
1. модуль в моём пакете my_package.string
2. стандартный модуль string
И вот тут вступает в дело приоритет импортов. В Python2 порядок следующий: помимо иных источников, раньше ищется модуль внутри текущего пакета, а потом в стандартных библиотеках. Таким образом мы импортнём my_package.string.
Но в Python3 это поведение изменилось. Если мы указываем просто имя пакета, то ищется именно такой модуль, игнорируя имена в текущем пакете. Если мы хотим импортнуть именно подмодуль из нашего пакета то, мы должны теперь явно это указывать.
from my_package import string
или относительный импорт, но с указанием пути относительно текущего модуля main
from . import string
Еще одной неоднозначностью меньше 😎
Подробней про импорты здесь:
https://docs.python.org/3/tutorial/modules.html
#2to3#pep#basic
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
Epiphany (Timket) Celebrated Across Ethiopia. Read more.
https://borkena.com/2026/01/19/ethiopia-epiphany-timket-celebrated-across-ethiopia/#Ethiopia#News#Epiphany#OrthodoxChurch
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
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)