Ранее я уже упоминал о другой фишке из ˍˍ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
#FLM/USDT analysis :
#FLM is forming higher highs (HHs) and higher lows (HLs) along the trendline support. The price has recently swept through the swing low stop losses and is now expected to move upward, resuming its bullish direction to test the swing high resistance level.
TF : 2H
Entry : $0.0423
Target : $0.0445
SL : $0.0409
#FLM/USDT analysis :
#FLM is currently in a bearish trend on the higher time frame. A retracement towards the 200 EMA is anticipated as the price forms a higher high structure. It is expected to move upward and test previous highs.
TF : 1H
Entry : $0.0584
Target : $0.0636
SL : $0.0560
#FLM/USDT analysis :
#FLM is currently in a downtrend, trading below the 200 EMA. The price is consolidating sideways within a support and resistance zone. It is currently facing rejection at the resistance zone and is expected to decline from this point, testing the support zone.
TF : 1D
Entry : $0.0620
Target : $0.0500
SL : $0.0700
#FLM🧐
👉EMA Confluence
👉Failure Swing
👉MACD
The second chart fully and automatically generated by our algorithm.
All drawings are based on only mathematical values and calculations instead of emotions.
Interested?
Check out -> www.coinlegs.com / www.legslabs.com