Вторая по частоте 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
⭕️ «Otra de las características de esta reciente sedición fue la violencia; como la del #Daesh.
- ¡Estos, como el Daesh, prendieron fuego a personas! ¡Prendieron fuego, destrozaron, decapitaron! Estos también hicieron las mismas cosas que hacía el Daesh...» (01/02/2026).
🔗 LEER 👉spanish.khamenei.ir/news/7144
✅@khamenei_es
KHAMENEI.IR | 𝕏 | Facebook| TikTok
According to the British newspaper, The Times, ISIS operates in the central Syrian desert, organizes sleeper cells, launches hit-and-run attacks and deadly ambushes, and assassinates Syrian tribal and clan leaders who oppose the group. Everything happens as the group takes advantage of the current state of chaos.
#Syria#ISIS#Daesh#Tartous
#Saudi_Arabia opens the first liquor store
Reuters and France news agencies claimed that the Kingdom of Saudi Arabia is preparing to open the first liquor store in the city of Riyadh.
According to the document, a copy of which was seen by Reuters, customers must register through a mobile app and after receiving a code from the State Department, they can purchase their monthly quotas at a special store.
Saudi Arabia is the largest #Wahhabi center in the world. They pay for Wahhabi schools in #Pakistan, #Afghanistan by selling oil. Graduates of these schools join #terrorist groups such as al-Qaeda, Taliban, #Daesh, Al-Nusra, Jaish al-Adl and blow themselves up among other Muslims to go to heaven. Mohammed bin Salman, the leader of Saudi Arabia, follows the path of Atatürk in #Turkey. Drinking alcohol is forbidden in Islam.
https://t.me/YediotNewsChat
🚨‼️ ATTENTA A MOSCOU 🇷🇺
TERRORISME AUTORISÉ 🤮–L’ambassade d’Ukraine a tranquillement recruté les tueurs du Crocus au Tadjikistan
Quelques semaines avant le carnage, un appel à candidatures de tueurs a été ouvertement publié sur le site de l'ambassade d'Ukraine au Tadjikistan.
L’opération a été dirigée personnellement par l'ambassadeur d'Ukraine, Valeriy Yevdokimov, qui se trouve être l’ex-chef du renseignement étranger de Zelensky.
La page du site a été effacée, mais des captures d’écran ont été faites.
«Les commanditaires les ont recrutés afin de donner au public occidental l’image qu’ils étaient soi-disant islamistes, retrace le haut fonctionnaire russe Alexandre Malkevitch
Il s'agit d'une opération des services de renseignement occidentaux et d’une tentative de mettre le public sur une mauvaise piste.
… Mot d’ordre immédiatement relayé par les médias occidentaux.
NB : VOUS COMPRENEZ POURQUOI LES ÉTATS-UNIS, L'ANGLETERRE ET LA FRANCE, AVEC LEUR ORGANE DE PROPAGANDE
#AttentatMoscou#MoscowAttack | Zelensky | THE CIA | #Moscou | Crocus City Hall | #CIA | #NATO | #VictoriaNuland | #DAESH | ISIS | #DGSE
@egountchibehanzinofficiel
#ManagmentdelaTerreur La #Russie chamboule tellement leur hégémonie en #Afrique, leur nouvelle ordre mondiale. Les gouvernement mondialistes (États-Unis 🇺🇸, France 🇫🇷, Angleterre 🏴 ), subissent une berezina en #Ukraine alors cela active des vieilles méthodes bien connues. Des attaques sous fausse bannière qu'ils appellent attaque terroriste de #Daesh.
Nous sommes en 2024, les peuples sont maintenant éveillés.
Cela ne passe plus. Tout se sait !
Vidéo ne ligne ! https://youtu.be/R0_aXILQ7Mk?feature=shared
#Usa#Moscou#Otan#Cia#Dgse#Ml6
@egountchibehanzinOfficiel