Ранее я уже упоминал о другой фишке из ˍˍ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
Harbor
Decentralized p2p identity verification system.
Identity management application written, targeting iOS, and Android, built on Polycentric. Create pseudonymous identities, make claims, link identities across applications.
Checkout harbor.social, or docs.polycentric.io for more information
What is Harbor and How it Works:
https://peertube.futo.org/w/939a212d-920f-4411-b9b6-d60aa4ef4db7
https://gitlab.futo.org/polycentric/harbor/
#p2p#id#verification#futo
https://x.com/HappyShaunVT/status/2026711290039906367
HappyShaun : Face verification is getting interesting. I THINK I CAN TRUST IT.
#happyshaun#vrchat#verification#meme#trust#lime
#Systemd Adds #Age#Verification & #Reddit#Linux Censors Age Verification Posts
Plus: Which Open Source Operating Systems plan to include Age Verification? The Lunduke Journal compiles a list.
Does It Age Verify?:
https://github.com/BryanLunduke/DoesItAgeVerify
https://lunduke.com
https://www.youtube.com/watch?v=M3erhbwqIAM
Lennart Poettering
#microsoft#stalking#surveillance#backdoor#trojan
Fight Disinformation with AI
INAR .IA Labs & Technologies has raised $1.21M for its innovative SaaS platform aimed at automating the detection and verification of disinformation across online content. Scheduled to launch on December 18, 2024, this multimodal and multilingual tool is set to enhance online security and information integrity. More details can be found at TrueFlag.
#Funding#Technology#AI#SaaS#Disinformation#Verification#OnlineSafety#Security#Innovation#Automation#Multimodal#Multilingual#Integrity#Content#Platform#Launch #2024 #INAR#TrueFlag#Labs