Ранее я уже упоминал о другой фишке из ˍˍ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
Federalism and Conservatism in Ethiopia: Reframing the Debate Beyond Ethnic and Civic Models. Read more.
https://borkena.com/2026/04/21/federalism-and-conservatism-in-ethiopia-reframing-the-debate-beyond-ethnic-and-civic-models/#Ethiopia#politics#government#Federalism
#Coming_UP: The Standard Signal |Ep. 12 – Ethiopia’s Constitutional Foundation and the Crisis of Western Tigray. Part II
Five years after the war in Tigray began, the constitutional crisis it exposed remains unresolved.
In Part II, Tsedale Lemma continues her conversation with Daniel Berhane, examining whether Ethiopia is still governed by its Constitution — or whether force has replaced law in determining territory.
If territorial disputes are settled outside constitutional order, what does that mean for Ethiopia’s federal future?
Part II premiers at: 7:30 PM tonight.
Subscribe to watch: https://www.youtube.com/@AddisStandard
#Ethiopia#WesternTigray#ConstitutionalOrder#RuleOfLaw#Federalism#Tigray#HornOfAfrica#AddisStandard
Premiering now: The Standard Signal | Ep.14: Tigray on the Brink: Survival, Famine Risks, and the Shadow of Renewed War in Ethiopia.
Click here to watch: https://www.youtube.com/watch?v=YDjUomfsWnA
Tigray is facing fragile recovery, deepening humanitarian strain, and growing fears of renewed war.
In this episode of The Standard Signal, Duke Burbridge shares what he witnessed on the ground — from survival and displacement to aid challenges and famine risks.
#StandardSignal#EthiopiaPolitics#ONLF#Ogaden#PeaceAgreement#PoliticalRepression#ShrinkingCivicSpace#ResourcePolitics#OilAndGas#Federalism#DemocracyInEthiopia#HornOfAfrica#Accountability#PoliticalDialogue#Tigray