Вторая по частоте 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
#PYR/USDT analysis :
#PYR is currently in an uptrend, forming a higher highs (HHs) and higher lows (HLs) structure. At present, the price is undergoing a correction phase, with expectations of a breakout from the trendline soon, which will allow it to resume its bullish momentum. Wait for a break above the $4.320 level as a signal to enter long positions.
TF : 1h
Entry : $4.320
Target : $4.845
SL : $3.969
#PYR/USDT analysis :
#PYR is in a downtrend, forming lower lows (LLs) and lower highs (LHs) structure. The price is currently trading below the 200 Exponential Moving Average (EMA). It is anticipated that the price will retrace back to the resistance zone and then reverse from there to continue its bearish momentum and test the previous swing low.
TF : 30min
Entry : $2.438
Target : $2.299
SL : $2.495
#PYR
https://www.binance.com/en/trade/PYR_BTC
Buying Zone 1850-1868
We are expecting ride in this Coin 🚀🚀🚀🚀
Buy in parts and Strictly follow as directed 👆
Sell
🤑 2000-2050
🤑 2050- 2250
🤑 2250- 2400
🚀 2400- 2600 & above
Exit/Re-Entry point- 1800
#PYR result
2 nd target achieved in just 5 days ✅✅
One more huge quick profit 22.4%🤑💰🤑
👉 Still thinking? The more you wait more you lose profit
☎️ Contact @MichaelStrategiesVip for membership and grab next breakout signal