Вторая по частоте 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
📩#ZROUSDT 30m | Mid-Term
📈Short Entry Zone: 2.2664-2.3691
🎯 - Strategy Accuracy: 92.26%
Last 5 signals: 80.0%
Last 10 signals: 85.0%
Last 20 signals: 87.18%
⏳ - Signal details:
Target 1: 2.2358
Target 2: 2.2052
Target 3: 2.1746
Target 4: 2.0828
_____
🧲Trend-Line: 2.3691
❌Stop-Loss: 2.4010
💡After reaching the first target you can put the rest of the position to breakeven
📩#ZROUSDT 30m | Mid-Term
📈Short Entry Zone: 2.1676-2.3075
🎯 - Strategy Accuracy: 93.28%
Last 5 signals: 87.5%
Last 10 signals: 92.31%
Last 20 signals: 86.96%
⏳ - Signal details:
Target 1: 2.1264
Target 2: 2.0851
Target 3: 2.0439
Target 4: 1.9202
_____
🧲Trend-Line: 2.3075
❌Stop-Loss: 2.3514
💡After reaching the first target you can put the rest of the position to breakeven
#ZROUSDT has achieved 9th TP in 8 hours in our VIP PRO channel!
Using a 5% entry you could've earned $619 with a $1000 deposit
ACCESS TO MANUAL TRADING for 70usdt/month
👉 We ain't just showing our results, we can show you the results of our VIP subscribers as well! Check them out: @propheta_reviews
Register and get bonuses up to $6,000
Binance | OKX | ByBit👈🏻click!
#tradingindicator#trading#btc
👆 Propheta living up to its name yet again 🔮
#ZROUSDT has achieved 9th TP in our VIP PRO channel!
$608 in profits with a 5% entry and a $1000 deposit!
Feels good to be a Propheta VIP, man... 🏖ACCESS TO MANUAL TRADING for 70usdt/month
⚡️Speed up your trading with Propheta AI Signals: real-time precision signals, elite-level automation, and Cornix integration — the future of trading is now! GET THE ACCESS TO AI SIGNALS
Register and get bonuses up to $6,000
Binance | OKX | ByBit👈🏻click!
#cryptoexchange#cryptocurrency#AItrader
#ZROUSDT UPDATE:
#ZRO is now currently trading around $1.4290. It has already broken out of the Falling Wedge pattern and is looking good. So if the price pumps from here, then we can see short-term bullish momentum in it according to the pattern. If the breakout is a fake out, then it may again trade inside the pattern. Keep an eye on it.
0⃣#ZRO + #Tether = 🚀🚀🚀
Tether recently invested in #LayerZero, and you know they don't drop cash without deep due diligence. 🕵️♂️ The fundamentals are rock solid.
This rally is just the beginning. 🌤 I’m stacking as much $ZRO as possible. targeting 2x - 5x gains! 💸
Get in or get left behind.👋
#DeFi#BullRun $ZRO #ZROUSDT
https://x.com/CryptoBull_360/status/2021403228970315928?s=20