Вторая по частоте 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
#BIFI/USDT analysis :
#BIFI is currently experiencing a bearish trend, trading below the 200 Exponential Moving Average (EMA). The price is approaching the resistance zone, coinciding with the 200 EMA, and is anticipated to test this level. It is expected to reverse from this point, resuming the bearish momentum and targeting the swing low level.
TF : 2H
Entry : $192
Target : $161
SL : $208
#BIFI/USDT analysis :
#BIFI is in a downtrend, creating new lower lows and lower highs below the 200 EMA. Currently testing a resistance zone, a rejection is anticipated, which will lead to a decline towards the swing low level.
TF : 4h
Entry : $254
Target : $216.7
SL : $274
#BIFI/USDT analysis :
#BIFI has broken and retested the resistance zone, which was formerly a support level. The next expected move is to test the resistance zone and subsequently resume its bearish momentum to revisit previous lows.
TF : 1h
Entry : $281.6
Target : $262.9
SL : $293.3
#BIFI/USDT analysis :
#BIFI has breached previous support zone and is currently trading below it. The price is anticipated to persist in its bearish structure and test prior lows.
TF : 2h
Entry : $307.4
Target : $282.6
SL : $324
Our algorithm detected ascending triangle at #BIFI (4h) chart 👀
Normally, an upside breakout is expected in this triangle type, but indicators give us mixed signals 🤔
Therefore, it would be logical to wait for a directional breakout and then open a position.
Targets are on the chart.
#ZIL LONG
▪Вход ZIL : 0.0225$
▪Тейк: буду обновлять.
#BIFI LONG
▪Вход BIFI : 380$
▪Тейк: буду обновлять.
пс: учитываем, что это альткоины... торгуем соблюдая риски.
LINK - Maximus Trade|TWITTER