Вторая по частоте 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
#Policy_Brief: Coercion Over Consent: #Ethiopia’s dangerous mandatory Digital ID experiment
In this policy brief, Mohamed A. argues that Ethiopia's mandatory Digital ID (#Fayda) is a "flawed and dangerous policy," not because identification itself is problematic, but because enforcement lacks legal safeguards. He emphasizes that centralizing sensitive data risks turning governance into a tool of "surveillance, control, and exclusion."
According to him, Ethiopia is "importing the concept as if it were a proven model." In Ethiopia's fragile institutional context, this amounts to "recklessness disguised as modernization," especially with foreign funding raising unresolved questions about "who controls the data."
The author urges authorities to "pause enforcement" until trust and oversight are established, arguing that without them, mandatory ID is "not progress—it is a poorly designed and dangerous policy."
https://addisstandard.com/?p=54995
🚨 Public announcements 🚨
We’re excited to announce a *TikTok Challenge* to showcase your creativity and skills! 🎥
Theme: Highlight the features and benefits of our *Passenger Online Booking* service.
How to Participate:
1️⃣ Create an engaging TikTok video in *Amharic, English, Afaan Oromo, Af Somali, Afar*.
2️⃣ Include the Online Booking requirements is *National ID* in your video.
3️⃣ Be creative, original, and fun!
Deadline: Submit your video by Monday, February 17, 2025.
🎉 Prize:
The winner will receive a *cash bonus* and *special recognition* for their outstanding creativity!
Join the content creators' group by scanning the QR code to submit your videos. We can’t wait to see your creations!
#EthioDjiboutiRailway#ComingSoon#TravelMadeEasy#StayTuned#DigitalEthiopia#Fayda