Ранее я уже упоминал о другой фишке из ˍˍ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
Russian government to subsidize rural mortgages
📌The funds are provided for the purchase of housing in rural areas.
📌This was said by the Prime Minister Mikhail Mishustin, at a meeting with Deputy Prime Ministers.
📌Additional 5 billion rubles will be allocated to subsidize over 160 thousand loans (under the Rural Mortgage program) that have been concluded in recent years.
📌In July 2023, the government increased the size of the concessional loan under the "Rural mortgage" to 6 million rubles. The initial payment for the program launched in the spring of 2020 is 20%.
📌 A loan in the amount of 100 thousand to 6 million rubles is issued for a period of up to 25 years. The preferential rate of 3% is preserved.
#news#russia#nido_russia#rural#housing#loans
https://t.me/nido_russia
Svakarma Finance Raises $10.4M
Svakarma Finance successfully raised $10.40 million in funding on December 13, 2024. For more details, visit their website.
#Funding#Finance#Svakarma#Investment#Capital#Startup #2024 #Market#Growth#Innovations#Loans#FinanceTech#DigitalFinance#Fintech#VentureCapital#Equity#FundingRound#FinancialServices#Economy
VakıfBank Secures $870M Funding Round
VakıfBank has announced a funding round of $870 million, set for November 26, 2024. For more details, visit their official page here.
#Funding#VakıfBank#Finance#Investment#FundingRound#Banking#Loans#Capital#Turkey#Business#Economy#November2024#Growth#Market#Assets#InvestmentOpportunities#FinancialServices#InstitutionalInvestors#Debt#Equity
NBU Accuses BitCapital of Illegal Lending
The National Bank of Ukraine (NBU) has accused the Ukrainian service BitCapital, which issues loans in USDT stablecoins, of providing illegal lending services. Over 700 complaints from citizens cite issues like high interest rates, wrongful charges, aggressive debt collection tactics, and lack of transparency. The service's operations in Ukraine are now banned. Read more here
#Ukraine#BitCapital#USDT#Banking#Regulation#Lending#Finance#Crypto#NBU#Loans#ConsumerProtection#Debt#InterestRates#Bans#Complaints#Market#IllegalServices#Transparency#FinanceNews#VC#Crypto