Ранее я уже упоминал о другой фишке из ˍˍ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
🗺Seychelles🇸🇨
Anse Georgette is a remote beach on the northwest coast of Praslin Island.
The shore features pristine white sand and round granite boulders. The beach is long, wide, and secluded, with almost no modern amenities.
#Seychelles
@voyage
🇷🇺🇸🇨#Russie–#Seychelles : accord culturel
La Russie et les Seychelles ont signé un mémorandum de coopération culturelle entre leurs ministères respectifs, afin de structurer et d'élargir leurs échanges.
L’accord prévoit le développement de projets communs dans les domaines du patrimoine, des musées et des événements internationaux, dans un contexte où les échanges artistiques sont déjà actifs entre les deux pays. La partie seychelloise s’est dite intéressée par l’expérience russe en matière de promotion culturelle et de préservation du patrimoine.
Crédit photo : Service de presse du ministère russe de la Culture
RT en français • Osez questionner !
⏺Patrick #Herminie, président de la république des #Seychelles, évoque la coopération de son pays avec les agences de voyage russes afin d’attirer les touristes aux Seychelles.
RT en français • Osez questionner !
Africa Cup of Nations - Qualification🌍
2026-03-29 13:00 UTC
South Sudan vs. Djibouti
Predicted outcome: South Sudan❌
Predicted score: 4:0
Actual: Djibouti 0:1
#SouthSudan#Djibouti
2026-03-29 15:00 UTC
Lesotho vs. Seychelles
Predicted outcome: Draw❌
Predicted score: 0:0
Actual: Lesotho 2:1
#Lesotho#Seychelles
#Football#AfricaCupofNations
Africa Cup of Nations - Qualification🌍
2026-03-26 13:00 UTC
Djibouti vs. South Sudan
Predicted outcome: South Sudan✅
Predicted score: 1:3
Actual: South Sudan 0:4
#Djibouti#SouthSudan
2026-03-26 14:00 UTC
Seychelles vs. Lesotho
Predicted outcome: Lesotho❌
Predicted score: 0:2
Actual: Draw 0:0
#Seychelles#Lesotho
#Football#AfricaCupofNations