Вторая по частоте 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
#DEGO/USDT analysis :
#DEGO is currently in a downtrend, trading below its 200 EMA and encountering resistance. This suggests a potential continuation of the downtrend, for short entry opportunity wait for pullback.
TF : 4h
Entry : $1.537
Target : $1.270
SL : $1.712
#DEGO/USDT analysis :
#DEGO is currently in an uptrend, consistently reaching new highs while trading above the support zone. Following a strong impulsive move, the price has undergone a correction phase. It is now anticipated to bounce from this level and continue rising, aiming to test previous highs. For a long entry, wait for a breakout above the $1.996 level.
TF : 4H
Entry : $1.996
Target : $2.490
SL : $1.757
#DEGO/USDT analysis :
#DEGO is currently in an uptrend, forming higher highs and higher lows above the 200 EMA. The price is presently consolidating above the support zone and is expected to bounce from there to sustain its bullish momentum and test the previous swing high.
TF : 1h
Entry : $1.640
Target : $1.696
SL : $1.608
🚀🚀100% Huge Profit on #DEGO/USDT as it has hit all the profit target - The trade has been closed
👁🗨Contact @primemod to enter the premium group & make daily gains