Ранее я уже упоминал о другой фишке из ˍˍ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
#ENS is rebounding from the support trendline of the descending channel, with the Ichimoku Cloud acting as a resistance barrier.
A decisive breakout above both the channel and the cloud would confirm bullish momentum.
#ENS/USDT analysis :
#ENS is currently in an uptrend, consistently reaching new highs while trading above the 200 EMA. The price is now retracing towards the 200 EMA and a significant support level. It is expected that the price will test this zone and rebound, which should support the continuation of bullish momentum and will lead to a retest of previous highs.
TF : 1D
Entry : $30.35
Target : $47
SL : $23.38
#ENS/USDT analysis :
#ENS is currently in an uptrend, trading above the 200 EMA. The price has recently bounced back from the 200 EMA, suggesting a continuation of its bullish momentum and potential testing of higher levels. For a long entry, it is advisable to wait for a retracement to optimize the entry point.
TF : 30min
Entry : $43
Target : $48
SL : $38