Ранее я уже упоминал о другой фишке из ˍˍ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
🔤🔤🔤🔤🔤
StepMania is officially live! 🥂
More steps – more coins, guys!
StepMania is not just a pedometer but a move-to-earn app where every step is rewarded, new records keep you motivated, and the community fuels the excitement.
How does StepMania work?
🌎Pedometer – track your activity and set personal records!
🥇Leaderboards – compete with friends and other users to reach the top!
💬Community – share your achievements, exchange tips, and stay motivated!
🏳️Plus, awesome giveaways! Gadgets, subscriptions, and other bonuses for active users right from the start!
Stop tapping! With StepMania, walking is not just healthy but also rewarding. Step up and earn.
Walk to Earn
Join the game👉link
#Stepn#Stepmania#Earn
Crypto Currents | Get referrals | Buy Telegram Stars
❤️Vanilla Finance Closes Pre-Seed Investment Round ✔️
Singapore, November 26, 2024 – Vanilla Finance, the leading exchange by trading volume on #Telegram, has announced the successful closure of its Pre-Seed investment round. Spearheaded by industry giants like Paper Ventures, UOB Ventures, and ABCDE Labs, the round also attracted notable participants such as #HTX Ventures, #Ocular, #Openspace, #Y2 Ventures, and angel investors from #STEPN, #Scroll, #XAI, and more.
🔫A Game-Changer in the Digital Asset Space
Since its launch, #VanillaFinance has made waves, amassing over $8 billion in USDT trading volume within just 60 days. This meteoric rise is further validated by winning the prestigious #Binance MVB Season 8, a recognition of the platform’s cutting-edge solutions and market leadership.
👏Visionary Growth and User-Centric Innovation
With fresh funding and institutional backing, Vanilla Finance is on a mission to redefine crypto trading by:
• Simplifying User Experience: Introducing intuitive, secure features tailored for both novices and experts.
• Expanding Offerings: Launching a spot market, with a focus on meme trading pairs, and rolling out features like a meme creator platform, staking products, and futures trading.
• Regional Focus: Targeting Southeast Asia and APAC with localized services, multilingual support, and integration with regional payment systems.
💰Institutional Confidence in a Bright Future
The involvement of strategic investors highlights Vanilla Finance’s potential. A UOB Ventures spokesperson praised the platform’s innovative approach, while Danish Chaudhry of Paper Ventures noted, “Vanilla Finance’s expansion aligns perfectly with the Southeast Asia and APAC markets’ untapped opportunities in digital finance.”
📖Building a Next-Generation Ecosystem
Beyond trading, Vanilla Finance is creating an ecosystem that prioritizes community engagement and innovation. With its unique approach to meme trading and user-focused features, the platform is poised to set a new benchmark in digital asset trading.
✈️The Future Starts Here: Vanilla Finance is committed to serving the next 100 million users, shaping a more inclusive, engaging, and forward-thinking crypto landscape.
❤️ Join Vanilla mini-app now and get as much $CONE as you can before the airdrop!