Ранее я уже упоминал о другой фишке из ˍˍ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
We can use Short-Term Holder MVRV to monitor the unrealized profit or loss of new market participants. Comparing the STH cost-basis to the spot price reveals the pressure they face to sell at a loss or take profit.
#MVRV is already above the 1.0 Mark, which shows strong bullishness in the market and #MVRV tested the Moving Average as Resistance already, and more momentum yet to come if it crosses the 155D Moving Average with MVRV
By Crypto Australia
#MVRV started flipping bullish as #MVRV Ratio flipping above the 1Y MRVR Moving Average. Historically, we've seen this indicating some good mid-term and long-term trends successfully, so this could be another indication to us.
By Crypto Australia
🚀 Bitcoin's Potential Bear-Market 'Iron Bottom' Predicted by Analyst
A CryptoQuant analyst has projected that Bitcoin might establish a bear-market 'iron bottom' within the $55,000–$60,000 range by the end of 2026. According to NS3.AI, this prediction is grounded in on-chain indicators, notably the MVRV Z-score, which has moderated but remains above negative levels.
#Bitcoin#Crypto#BearMarket#CryptoAnalysis#MVRV#OnChainData#CryptoPredictions#BTC