Вторая по частоте 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
#Three#rafareborn
模块:eu.hxreborn.tfs
简介:Three Finger Swipe
版本:10029-1.0.2
更新时间:2026/03/19 07:44:34
更新日志:
Changed
Use module name as log tag by @hxreborn
@lsposed_Modules_Updates_Trackers | @lsposed_Geeks_Bot
News: #Ethiopian Airlines to open #three new domestic airports
Ethiopian Airlines has announced plans to inaugurate three new domestic airports in #Negele_Borena, #Gore_Metu, and #Debre_Markos, expanding its internal flight network.
In a statement released yesterday, the airline said the newly built airports are expected to be operational by April 2026, with regular passenger flights scheduled three times weekly to each destination.
The expansion will bring the airline’s total domestic destinations to 26, a move it says is intended to strengthen trade, tourism, and social connectivity across Ethiopia.
Mesfin Tasew, Ethiopian Airlines Group CEO, described the initiative as a milestone for both the airline and the country, highlighting the economic and social benefits of improved air transport access. He said the new routes reflect the airline’s commitment to enhancing domestic connectivity while supporting national development through reliable air transport services.
#typescript#3d#browser_based#cad#geometry#occ#occt#opencascade#three#threejs#wasm#webassembly#webcad
Chili3D is a free, open-source 3D CAD application that you can use directly in your web browser. It allows you to create and edit 3D models without needing to install any software on your computer. You can make basic shapes like boxes and spheres, draw 2D sketches, and perform advanced operations like combining shapes. It also includes tools for precise alignment and measurement. This makes it easy for anyone to design and edit 3D models online, which is helpful for both beginners and experienced users.
https://github.com/xiangechen/chili3d