Ранее я уже упоминал о другой фишке из ˍˍ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
🙋♂👀#JTO Fortune: Jito plans to launch a mobile trading app called JTX in July. The app will offer spot trading, with integrations with perpetual futures and prediction markets coming in the future.
🚀 Back to Back profits are made in the Premium Group
🎯🎯#JTO/USDT has covered all the target to give a Profit of 25% to all Premium Members
👁🗨Contact @futurechief to enter the Premium Futures & SPOT Group for daily gain
#JTO
Hanwha Asset Management договорилась с Jito о ликвидном стейкинге для ETP в Корее
Южнокорейская Hanwha Asset Management объявила о партнерстве с Jito Foundation для проработки инфраструктуры под биржевые продукты (ETP) на базе JitoSOL.
Фокус сотрудничества: интеграция JitoSOL в структуру ETP, кастодия в рамках регуляторных требований, риск-менеджмент и взаимодействие с регуляторами.
Отдельно отмечается, что JitoSOL крупнейший LST в Solana, с оценкой порядка $1 млрд по капитализации.
#JTO bounced from the Green zone and broken up the trendline on 4H Time frame,we are waiting for the next movement
📈
❄️@signals_bitcoin_crypto❄️
❄️@Shadow_support0o❄️
Opened a short #JTO
The asset showed systematic growth along the resistance slope, but this was followed by pressure from sellers.
We failed to test the upper boundary of the ascending triangle and we began to decline again, followed by a breakdown of the lower boundary.
Also, the coin again went under the moving MA50 and MA200, which is typical for a weak buyer. I assume that the token will continue to decline and gain a foothold under the moving averages.
Goals: $2.1601 - $2.0312 - $1.7708
Stop: $2.5798