Вторая по частоте 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
FJORDS(峡湾) 8K 60FPS
Although a sought-after destination in the summer, the Norwegian fjords lay mostly empty in the winter time. However, this time of year is no less magical. This video aim to show this magic, all in glorious 8K resolutions at 60 fps.
挪威峡湾虽然是夏季的热门目的地,但在冬季时空无一人,在一年中的这个时间的景色同样非常不可思议。此视频旨在以60 fps的出色8K分辨率显示这种魔力。
- 作者: Morten Rustad
- https://youtu.be/0pmvuKzBIqM
频道: @View_4k#8k
Hawaii in 8K ULTRA HD - Paradise of North America (60fps)
This videos you can use for learn Nature, about place, River, Country, City, etc with Ultra-HD resolution.
- 原视频: https://youtu.be/PF1EAtMswPo
- 画质(上面链接): 8K60P
- 作者: 8K World
统计: @View_4k#4k#8k
From Darkness To Light
From Darkness To Light is an 8k Time-Lapse film shot by storm chaser Ty Schmitt. All the clips in the film were captured on the Great Plains during the 2019 spring storm season. Ty traveled over 30,000 miles in 3 months chasing Mother Nature's most intense moments.
All images were shot on a Nikon D850, and edited in LRTimelapse, After Effects, and Premiere Pro.
- 原视频: https://youtu.be/MlIXpZFTBP4
- 画质(上面链接): 8K
- 作者: Ty Schmitt
统计: @View_4k#4k#8k
Hawaii in 8K ULTRA HD - Paradise of North America (60fps)
This videos you can use for learn Nature, about place, River, Country, City, etc with Ultra-HD resolution.
- 原视频: https://youtu.be/PF1EAtMswPo
- 画质(上面链接): 8K60P
- 作者: 8K World
统计: @View_4k#4k#8k
From Darkness To Light
From Darkness To Light is an 8k Time-Lapse film shot by storm chaser Ty Schmitt. All the clips in the film were captured on the Great Plains during the 2019 spring storm season. Ty traveled over 30,000 miles in 3 months chasing Mother Nature's most intense moments.
All images were shot on a Nikon D850, and edited in LRTimelapse, After Effects, and Premiere Pro.
- 原视频: https://youtu.be/MlIXpZFTBP4
- 画质(上面链接): 8K
- 作者: Ty Schmitt
统计: @View_4k#4k#8k
Frankfurt
Frankfurt is a city of great diversity. It is a metropolis of banks and big business shows and shopping on the one side, culture and traditions on the other.
- 原视频: https://youtu.be/UaveL8lp_ws
- 画质(上面链接): 8K
- 作者: Cities in 4K
统计: @View_4k#4k#8k
FJORDS(峡湾) 8K 60FPS
Although a sought-after destination in the summer, the Norwegian fjords lay mostly empty in the winter time. However, this time of year is no less magical. This video aim to show this magic, all in glorious 8K resolutions at 60 fps.
挪威峡湾虽然是夏季的热门目的地,但在冬季时空无一人,在一年中的这个时间的景色同样非常不可思议。此视频旨在以60 fps的出色8K分辨率显示这种魔力。
- 作者: Morten Rustad
- https://youtu.be/0pmvuKzBIqM
频道: @V1_BLOG#8k#view
TelegramUltraPrivateChannel #0042
My old designs in 8 Colors
>> FOR <<
#iPhone14
#iPadAir5
#8K#Desktop
----------------------
Prod. By@Hk3ToN
----------------------