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

Резултати

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

Пребарај: #arvr

当前筛选 #arvr清除筛选
Venture Village Wall 🦄

@venturevillagewall · Post #4143 · 13.02.2025 г., 19:00

Steve Yun Speaks at Consensus HK On February 20, Steve Yun from TON Foundation will present at Consensus HK, discussing 'Emerging Markets on the Road to Financial Freedom.' Join to explore DeFi's future and the impact of evolving regulations on Web3. Details here. ⚡️ OpenSea announces OS2 beta version and airdrop. Read more 🚓 In Thailand, Russians arrested for stealing Bitcoin worth $16.5 million. Read more 🧠 A look into the Metaverse and AR/VR projects you might have missed. Read more 🐋 VanEck says some US states will buy $23.5 billion in Bitcoin. Read more 👀 A new Bitcoin-ETF linked structured bond launches in Russia. Read more 🧐 JPMorgan identifies condition for Tether's compliance with US regulations. Read more ❌ Illegal Bitcoin farm shut down near Irkutsk. Read more 🤖 Sam Altman discusses features of GPT-4.5 and GPT-5. Read more 💫 BNB recovered losses following 2025 roadmap release. Read more 🔎 Ethereum Foundation allocates $120 million to DeFi protocols. Read more 👾 WLFI co-founder's X-account hacked to promote a scam. Read more 🔥 Former Greek finance minister criticizes Bitcoin maximalists. Read more #Finance#DeFi#Web3#Bitcoin#OpenSea#Crypto#Ethereum#EthereumFoundation#Cryptocurrency#Blockchain#Thailand#Regulation#CryptoNews#SamAltman#AI#Innovation#Technology#Investment#Metaverse#ARVR#VanEck