Ранее я уже упоминал о другой фишке из ˍˍ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
#WOO/USDT analysis :
#WOO is currently trading within a channel, and a retracement to the 200 EMA is pending. The price is likely to move upward and test the previous swing high resistance, with expectations for continued upward movement.
TF : 1D
Entry : $0.1629
Target : $0.2186
SL : $0.1469
#WOO Failure Swing Detection 👇
The chart fully and automatically generated by our algorithm.
All drawings are based on only mathematical values and calculations instead of emotions.
Interested?
www.coinlegs.com
#WOO bounced back from the Weekly Trendline and now hitted the Supply zone,in the case of breakout we will see another pump.🚀
otherwise wait to see the price reaction to the trendline again.👀
❄️@signals_bitcoin_crypto❄️
❄️@Shadow_support0o❄️
#WOO/USDT UPDATE:
#WOO is now trading around 0.45$. #WOO has broken down of a bear flag on hourly time frame. Now the Possible scenario is according to the pattern, we can see 10-20% dump in this. Keep eye on it 👀Stay tuned with us for further updates✔️
#WOO/USDT UPDATE:
#WOO is now trading around 0.454$. $WOO has formed a bear flag pattern on the hourly time frame. So the Possible scenario is If the price dumps and breaks down the pattern, we can see a dump in it. Keep eye on it👀. Stay tuned with us for further updates✔️