Ранее я уже упоминал о другой фишке из ˍˍ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
🚀 Circle Mints Additional 250 Million USDC on Solana Blockchain
Circle has recently minted an additional 250 million USDC, according to ChainCatcher. Over the past month, Circle has minted a total of 10.5 billion USDC on the Solana blockchain. This development highlights Circle's ongoing activities in expanding its USDC supply on Solana.
#Circle#USDC#Solana#Blockchain#Crypto#Stablecoin#Cryptocurrency#Minting#DeFi#CryptoNews#SOL
🚀 USDC Treasury Mints 250 Million USDC Without Stated Reason
A recent report from Whale Alert indicates that 250 million USDC has been minted at the USDC Treasury. According to NS3.AI, the report did not specify the reason behind this significant minting event. The lack of explanation has left market participants speculating about the potential implications for the cryptocurrency market.
#USDC#Treasury#Cryptocurrency#WhaleAlert#Minting#NS3AI#MarketSpeculation
🚀 USDC Treasury Mints 250 Million USDC
A significant transaction was reported by Whale Alert, indicating that 250 million USDC was minted at the USDC Treasury. According to NS3.AI, this development could have implications for the stablecoin market, as such large minting activities often influence liquidity and market dynamics. The minting of USDC, a stablecoin pegged to the U.S. dollar, is closely monitored by market participants due to its potential impact on trading volumes and market stability.
#USDC#Treasury#WhaleAlert#Stablecoin#Liquidity#MarketDynamics#Minting#TradingVolumes#MarketStability
🚀 1 Billion DOT Minted and Sold on Ethereum and Polkadot Networks
PeckShieldAlert posted on X that a significant amount of 1 billion DOT tokens were minted and subsequently sold on the Ethereum and Polkadot networks. This development has raised concerns within the cryptocurrency community regarding the potential impact on the market value of DOT tokens. The minting and selling activities were observed on both networks, highlighting the interconnected nature of blockchain platforms. The implications of this large-scale transaction are yet to be fully understood, as stakeholders assess the potential effects on the market dynamics of DOT.
#1BillionDOT#Ethereum#Polkadot#cryptocurrency#marketimpact#PeckShieldAlert#blockchain#DOTtokens#crypto#minting#selling#marketdynamics
Telegram Unveils Major NFT Update
🎉 Telegram introduces a big update allowing gifts and stickers to be converted into NFTs. Gifts gain unique traits like emotions, backgrounds, and colors, enhancing their individuality and value. Rare traits will be limited to 10% of users, creating opportunities for resale at higher prices. Gifts can be converted for 25 Stars, while minting NFTs incurs network fees. Future integration with platforms like Fragment or GG is expected for seamless NFT creation. 🐸 The latest highlight is a unique frog gift gaining traction!
For more details, visit: Full Update
#Telegram#NFT#Gifts#Crypto#Updates#Blockchain#Stars#Minting#Fragment#GG#Frogs#RareItems#DigitalAssets#Community#Market#Trading#Tech#Innovation#SocialMedia#Engagement#CryptoTrends