Ранее я уже упоминал о другой фишке из ˍˍ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
#GALA/USDT analysis :
#GALA is currently consolidating above the support zone and the 200 EMA. A price bounce is anticipated, allowing for a continuation of its bullish momentum aimed at testing previous highs. Wait for a breakout above the $0.03736 level for a long entry.
TF : 1D
Entry : $0.03736
Target : $0.06650
SL : $0.02860
#GALA/USDT analysis :
#GALA is in an uptrend, forming higher highs and higher lows. After retracing to the 200 EMA and a support zone, the price bounced back and broke the trendline. This suggests a bullish continuation, with expectations to test previous highs.
TF : 15min
Entry : $0.05933
Target : $0.06655
SL : $0.05497
#GALA/USDT Analysis-
After forming a symmetrical triangle pattern, the price broke out, achieving a 30% gain within three days. Currently, the price has completed a retest and is approaching its previous swing high. If it successfully breaks above this level, it has the potential to rally further by over 45%.
T.F.- 1-D
ENTRY- 0.0317
SL- 0.02720
TARGET- 0.04640
Note: If the stop-loss is triggered before entry, disregard the trade as the price action may develop differently.
#GALA/USDT analysis :
#GALA is in an uptrend, making higher highs (HHs) and higher lows (HLs). The price has recently tested the support zone and is expected to bounce back from there to test the previous swing high.
TF : 1D
Entry : $0.01984
Target : $0.02441
SL : $0.01824