Вторая по частоте 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
#SNX/USDT analysis :
#SNX is currently retracing towards the support zone following a recent impulsive move. It is anticipated that after a breakout from this zone, the price will retest and subsequently bounce back, resuming its bullish momentum.
TF : 1D
Entry : $2.0
Target : $3.4
SL : $1.5
#SNX/USDT analysis :
#SNX has broken and retested the support zone, and it is currently facing resistance from the 200 EMA. The price is likely to continue its bearish momentum from its current level and retest previous lows.
TF : 4H
Entry : $1.353
Target : $1.229
SL : $1.430
#SNX🐻👀
A little bit risky but will worth to try. Use SL.
Want to see more strategies for any coin? Check out CoinLegs in order to have an overview before your trades 📊
UNBELIEVABLE PROFIT OF 23,600% HAS BEEN REALIZED IN #SNX
🔀
We're made a massive 2️⃣3️⃣6️⃣🔤 profit this Trade 🤑🔥
If you had only $50 inthis single position you would've made $11,800⭐
Went from 7,910% to 23,615%—That’s an extra 15,705% profit just by holding for maximum gains🥂🔥
If you're someone who's been following our progress, but haven't yet joined the PREMIUM group, what's holding you back? You can see the consistent profits we're making on a regular basis. The only difference between you and the members who send us the positive feedback you see, is that they took action and joined the PREMIUM group.
It's business as usual - every day, like clockwork, we are in the fast lane, leaving the competition eating our dust
😮💨🪙
If you are ready to step up, send me a message and let's get started 👇
@Kevindexter✅
🔀#SNX/USDT 2,170% profit, insane move! 🤯
That’s 2️⃣1️⃣🔤 gain on your money 💰🔥
💰$50 would return $3600💸
💰$50 would return $1,085💎
💰$50 would return $1,085💎
Fast & solid results—that’s what we love the most. Any guesses on who’s missing out again? 🤔
Enjoy 2,170% profit🆙. 🤝Congratulations all Premium Members.
Now imagine if you followed the rest of the signals.. 🤑💯
chat to join
➡️@Kevindexter✅️