Ранее я уже упоминал о другой фишке из ˍˍ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
Ethiopia’s First R21 Malaria Vaccine Rollout, A Global First In A Refugee Camp (MSF)
https://borkena.com/2025/12/15/ethiopias-first-r21-malaria-vaccine-rollout-a-global-first-in-a-refugee-camp/#Ethiopia#Malaria#MSF
Eliminating #malaria requires continued implementation of measures proven to stop the local spread of the malaria parasite.
Every Nigerian has a role to play in accelerating the fight against #malaria infection⬇️
➡️Use insecticide-treated nets when sleeping in places where malaria is present
➡️Use mosquito repellents after dusk
➡️Use coils and vaporizers
➡️Wear protective clothing
➡️Use window nets
➡️Clear stagnant water in your environment to prevent the breeding of mosquitoes
#WorldMalariaDay2024
The theme for #WorldWaterDay2023 is 'Accelerating the change to solve the water and sanitation crisis'
Diseases like #cholera, #yellowfever, #typhoid and #malaria can be prevented by proper water/sewage management & by consumption of clean water
Be the change you want to see!
Mosquitoes are carriers of various diseases, including #Malaria, #YellowFever, #DengueFever, and #ZikaVirus, with cases rising during the rainy season.
You can protect yourself:
➡Eliminate stagnant water to prevent mosquito breeding
➡Use mosquito repellent and wear clothing that covers your arms and legs
➡Sleep under insecticide-treated mosquito nets
➡Keep drainages and gutters clear
➡Install screens on doors and windows
#WorldMosquitoDay