Ранее я уже упоминал о другой фишке из ˍˍ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
#MKR/USDT analysis :
#MKR is currently in a downtrend. It is advisable to wait for the price to retrace and test the resistance zone for a short entry. The price is expected to resume its bearish momentum and test lower levels.
TF : 4H
Entry : $1,074
Target : $778
SL : $1,209
#MKR/USDT analysis :
#MKR is in a downtrend, forming lower lows (LLs) and lower highs (LHs). The price is anticipated to continue its bearish momentum and test lower levels. It is recommended to wait for a pullback for a short entry.
TF : 2h
Entry : $1,283
Target : $1,006
SL : $1,426
#MKR/USDT analysis :
#MKR is currently consolidating in a channel. The higher timeframe direction shows bearish sentiment, hinting at a possible breakout from the channel to keep moving downwards to lower levels. Waiting for a channel break and the $1,884 level before considering a short entry is recommended.
TF : 2H
Entry : $1,884
Target : $1,576
SL : $2,045
#MKR | Failure Swing detected by CoinLegs Algorithm 😎
A quick and risky position can be opened from the neck area.
Personally, I would be a bit more cautious and wait for the price to come down and rise from there.
Dyor, NFA.
www.coinlegs.com
💰#MKR pullback done,now we are waiting for a bullish momentum from the Green zone,pump it to the moon 🚀
❄️@signals_bitcoin_crypto❄️
❄️@Shadow_support0o❄️