TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #61 · 2 апр.

Ранее я уже упоминал о другой фишке из ˍˍ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

Резултати

Пронајдени 2 слични објави

Пребарај: #endangered

当前筛选 #endangered清除筛选
Google Facts™ [ ️@googlefactss🌎]

@googlefactss · Post #40041 · 08.11.2025 г., 19:01

Today we present you: The takahē (Porphyrio hochstetteri) — a flightless, endemic New Zealand bird, that was once thought extinct and famously rediscovered in 1948 — has been saved from the brink of extinction by intensive conservation: captive breeding, predator control, and protected reserves. Populations have increased but the species remains threatened and needs continued protection. Around 500 birds are now known to survive. [Learn more here] Tags: #Takahē#Conservation#NZ#Endangered#LazarusSpecies

Google Facts™ [ ️@googlefactss🌎]

@googlefactss · Post #40026 · 06.11.2025 г., 15:02

We have the honor of presenting you the Cuban solenodon (Atopogale cubana) it is a small, nocturnal mammal endemic to Cuba. Secretive and evolutionarily unique, it delivers venom through grooves in its lower incisors during a bite. Populations are fragmented and declining; the species is endangered due to habitat loss and invasive predators. Increased surveys and habitat protection are needed. [Learn more here] @googlefactss #CubanSolenodon#Endangered#Conservation#Cuba#LazarusSpecies