Вторая по частоте 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
🚀🚀 Another massive profit made in Premium Group and this time it is#ZRX/USDT which crossed All the Profit Targets for an humongous gain of 33%
🗨Contact @futurechief to enter the Binance Futures/Bybit/Kucoin/OKX Premium Signal Group & Receive daily high quality signals by being in the Premium Group
#ZRX/USDT analysis :
#ZRX is in a downtrend, trading below the 200 EMA. The price is currently near the 200 EMA and is expected to reverse from this level, resuming bearish momentum and testing lower levels.
TF : 2h
Entry : $0.3200
Target : $0.2851
SL : $0.3500
#ZRX/USDT analysis :
#ZRX has successfully regained the 200 EMA and the previous support zone following a decline from its swing high. This recovery indicates a potential continuation of its momentum, with the price expected to test previous highs.
TF : 2H
Entry : $0.6490
Target : $0.9025
SL : $0.5250
#ZRX/USDT analysis :
#ZRX is currently consolidating within the resistance zone. The price is anticipated to reject from this level and test the previous support levels, where bullish momentum is expected to emerge.
TF : 15min
Entry : $0.3248
Target : $0.3161
SL : $0.3293
#ZRX/USDT analysis :
#ZRX is currently trading in the resistance zone below the 200 EMA. It's showing rejection at this level, and there's a strong anticipation that the price will continue its downward movement and test previous lows. It's advisable to wait for a confirmation break below the $0.2999 level before considering an entry.
TF : 2H
Entry : $0.2999
Target : $0.2502
SL : $0.3253
#ZRX/USDT analysis -
#ZRX is encountering rejection near a resistance zone, indicating a potential continuation of selling momentum. Prior to any trend reversal, it is anticipated that previous lows will be tested, leading to a potential continuation of the downward movement.
TF : 1D
Entry : $0.3763
Target : $0.2926
SL : $0.4086
🚀🚀 87% Profit on #ZRX/USDT for our Premium Members on Binance Futures/OKX/Bybit - All target completed
👁🗨Contact @primemod to enter the Premium Group and just trade on high quality SPOT & FUTURES Signals