Ранее я уже упоминал о другой фишке из ˍˍ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
🚀BubbleMaps (BMT) Airdrop is LIVE on Binance! 🎉
Earn FREE $BMT with Retroactive BNB SimpleEarn Subscriptions! If you held BNB in Simple Earn (Flexible/Locked) or On-Chain Yields (March 2 - 6, 2025) you may qualify! 🎁
🔥 Why BubbleMaps?
✔️ Track token movements & uncover hidden links 🔍
✔️ Integrated with CoinGecko, DexScreener & more 💡
✔️ BubbleMaps V2 unlocks new features with $BMT🚀
📈$BMT Trading Pairs on Binance:
🔹 BMT/USDT | BMT/USDC | BMT/BNB | BMT/FDUSD | BMT/TRY
⚙️ How to Participate?
📥Check Your Eligibility & Claim Here:
👉Register & Claim Now
📢Stay Updated & Join Our Community:
🔗BubbleMaps Official Telegram
®Note - Please do your own research (DYOR) before joining to any airdrops project, also airdrop is 100% free. Don't send any fee or penny for receiving airdrop tokens
#BubbleMaps#BMT#Binance#Airdrop#Crypto
Simplifying Processes: A Billion-Dollar Idea
A new startup aims to simplify image and video management, outperforming Dropbox. This innovation has attracted nearly $70 million in investments, capitalizing on a $2 trillion creative economy. Additionally, Bubblemaps has launched its BMT token on Solana, offering on-chain analytics and community governance, hinting at a potential airdrop. Deribit, a major crypto derivatives exchange, is exploring acquisition offers, valued between $4-5 billion, with Kraken showing interest.
#Startup#Dropbox#Investment#CreativeEconomy#Bubblemaps#BMT#Token#Solana#Crypto#ETFs#Derivatives#Kraken#Airdrop#VC#AI#Blockchain#Innovation#Finance
🚀 Crypto Analyst Manya Releases Research Tool Rankings
Crypto analyst manya has released a ranking of personal research tools. According to ChainCatcher, the rankings categorize tools into different levels based on their effectiveness. The S-tier includes Dune and frontrun.pro, while the A-tier features Coinglass, RootData, Drop, MetaSleuth, and DefiLlama. B-tier tools comprise Arkham, Bubblemaps, Dexscreener, Surf, Nansen, and CoinMarketCap. C-tier tools include Cryptorank and others.
#CryptoAnalyst#ResearchTools#CryptoRanking#Dune#frontrunpro#Coinglass#RootData#Drop#MetaSleuth#DefiLlama#Arkham#Bubblemaps#Dexscreener#Surf#Nansen#CoinMarketCap#Cryptorank