Ранее я уже упоминал о другой фишке из ˍˍfutureˍˍ , это оператор деления.
from __future__ import division
Суть проста. Раньше сложность типа данных результата поределялась типом самого сложного операнда.
Например:
int/int => int
int/float => float
В первом случае оба операнда int, значит и результат будет int. Во втором float более сложный тип, поэтому результат будет float.
Если нам требуется получить дробное значение при делении двух int то приходилось форсированно один из операндов конверировать в float.
12/float(5) => float
Но с новой "философией" это не требуется. В Python3 "floor division" заменили на "true division" а старый способ теперь работает через оператор "//".
>>> 3/2
1.5
>>> 3//2
1
То есть теперь деление int на int даёт float если результат не целое число.
В классах теперь доступны методы __floordiv__() и __truediv__() для определения поведения с этими операторами.
Данный переход описан в PEP238.
#pep#2to3#basic
#LTO/USDT analysis :
#LTO is currently rejecting from a double top resistance zone and showing bearish signs. It is expected to continue declining and test the previous swing low.
TF : 1h
Entry : $0.1124
Target : $0.1079
SL : $0.1151
#LTO | Bounced From Support Level 🧱
How did we find this detection?
1⃣ Visit Detection Analysis at CoinLegs
2⃣ S/R Analysis
3⃣ Variables:
Binance<>USDT<>1h<> Above the S/R Zone<>Weaker
4⃣ Start Analysis
That's it.
Trade easily with free advanced trading tools 💹
#LTO bounced from the Weekly Demand zone,also broken up the trendline and now we are waiting for a pullback to enter the train 🚀
❄️@signals_bitcoin_crypto❄️
❄️@Shadow_support0o❄️
#LTO result
2nd target achieved in just 5 hours ✅✅
One more quick profit 9%💰🤑
👉 The longer you wait more you lose profit. Hurry up 🏃♂
☎️ Contact @MichaelStrategiesVip
🛒Coin added - LTO Network#LTO paired with #USDT on Binance looks good for a long-term investment.
It ranks 345 in the CoinMarketCap rating.
Good fundamentals stuff are expected by the end of the year.
The coin has not pumped and is in a neat uptrend.
The price is at the exit from the resistance zone.
Price projector indicates a rise of $0.15.
Support is the $0.05-0.06 zone.
Growth in my experimental portfolio is expected from 70 to 190%.