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

TGINSIGHT SIMILAR POSTS

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

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

Те, кто в Python не первый день, хорошо знают, что на число можно умножить не только число, но и другие типы. Главное, чтобы у этих типов была реализация такой операции. # list >>> [1] * 3 [1, 1, 1] # tuple >>> (2, 3) * 3 (2, 3, 2, 3, 2, 3) # string >>> "A" * 3 "AAA" Так работает полиморфизм стандартных типов. Интересно здесь то, что это сработает и в том случае, когда порядок операндов обратный. То есть int умножить на [тип]. # list >>> 3 * [1] [1, 1, 1] # tuple >>> 3 * (2, 3) (2, 3, 2, 3, 2, 3) # string >>> 3 * "A" "AAA" Если хотите реализовать такое поведение в ваших классах то следует помнить два момента: 1. Если множитель справа, то вам нужно реализовать метод __mul__, наш класс это первый операнд, то есть слева. myType * 3 2. Если множитель слева, то вам нужно реализовать метод __rmul__, наш класс это второй операнд, справа. 3* myType Всё тоже самое можно делать и для других математических операторов. И если в этом примере действие и результат будут фактически одинаковыми, то бывают ситуации, когда это не так. Например, при умножении матриц имеет значение порядок операндов. Для других операторов, таких как деление или сдвиг, очень важно кто с какой стороны находится. >>> 2/4, 4/2 (0.5, 2.0) >>> 2<<3, 3<<2 (16, 12) >>> 100%15, 15%100 (10, 15) #tricks#basic

Резултати

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

Пребарај: #web3social

当前筛选 #web3social清除筛选
UXLINK

@uxlink_community · Post #918 · 05.05.2026 г., 10:34

🤝 New Partnership: UXLINK x @GXChainGlobal We are excited to collaborate with REI Network, the lightweight, zero-fee L1, to drive the next wave of Web3 mass adoption! 🚀 By combining UXLINK’s Social Growth Layer with REI’s high-performance, EVM-compatible infrastructure, we’re making Web3 more accessible and social than ever. Together, we are building a frictionless future for DeFi, Gaming, and beyond. 🌐✨ #UXLINK#REINetwork#Web3Social#Blockchain

UXLINK

@uxlink_community · Post #854 · 20.02.2026 г., 01:21

The Social Growth Layer for Web3 Mass Adoption.🌐 Thrilled to see @MessariCrypto break down UXLINK's infrastructure model. 🔑Key Takeaways: 1️⃣ UXLINK is the "Onboarding Layer" for partners like @SonicSVM & @DeAgentAI. 2️⃣ We bridge users to emerging AI ecosystems via trusted social graphs. We are the distribution engine for the AI & Web3 economy. 🚀 📖Read the full report below👇https://messari.io/report/uxlink-partnership-growth-model-overview #UXLINK#Messari#Web3Social#Infrastructure

UXLINK

@uxlink_community · Post #914 · 24.04.2026 г., 08:07

🤝 New Partnership: UXLINK 🤝@BrcToTheMoon We’re teaming up with Beatcoin to transform on-chain interactions into measurable economic value! 🚀 By combining Beatcoin’s behavioral primitives with UXLINK’s Social Growth Layer, we’re moving beyond simple metrics to reward genuine, long-term user engagement. 🔗 🔹 Behavior > Outcomes 🔹 Standardized Contributions 🔹 Efficient Incentives #UXLINK#Beatcoin#Web3Social#OnChainValue

UXLINK

@uxlink_community · Post #906 · 09.04.2026 г., 07:48

New Partnership: UXLINK 🤝 C4E We’re excited to partner with @Chain4Energy to bring DePIN & Energy Management into the UXLINK Social Ecosystem! C4E is an AI-powered Layer 1 platform designed for real-world energy and e-mobility management through DePIN infrastructure. ⚡️🤖 Together, we are driving: 🔹 Social-led growth for sustainable energy 🔹 AI-powered intelligent coordination 🔹 Community-driven rewards & engagement Let’s build a greener and more connected Web3 together! 🔗🔋 #UXLINK#C4E#DePIN#Web3Social

UXLINK

@uxlink_community · Post #922 · 09.05.2026 г., 07:32

🤖 Exploring the Future of AI Finance with @HavenAI_! We are excited to partner with Haven AI, the autonomous execution layer bringing AI agents like OpenClaw to on-chain fixed income. Their ability to turn natural language into cross-chain strategies is a game-changer! At UXLINK, we’re excited by innovations that make Web3 more intuitive. Could AI-driven yield be the next big thing for social communities? Stay tuned! 🚀📈 #UXLINK#HavenAI#AI#SocialFi#Web3Social

UXLINK

@uxlink_community · Post #470 · 10.05.2025 г., 05:27

最近の日本Web3界隈で目立つのが、UXLINKの存在感。🇯🇵🔍 CNPとの提携を皮切りに、日本ローカルの強力なIPとの協業が加速⚡ オンチェーン/オフチェーン両方でのコミュニティ展開に加え、 Web2企業とのクロスパートナー戦略も水面下で進行中🤝 “ユーザー起点のWeb3ソーシャル”という文脈で、 UXLINKは今、日本で一番面白い動きをしているかもしれない。🚀 #UXLINK#Web3JP#CNP#ソーシャルレイヤー#CommunityDriven One of the most quietly significant players gaining traction in Japan’s Web3 scene 🇯🇵👀#UXLINK Following its recent collaboration with CNP—a top domestic IP—UXLINK is making inroads across both native Web3 communities and mainstream Web2 circles 🤝 IRL activations, on-chain social dynamics, and a clear long-term strategy signal a serious Japan play 🎯 If you're tracking the rise of social infrastructure in Asia’s Web3 movement, this is one to watch. 📡 #UXLINK#Web3Japan#CommunityLayer#CNP#Web3Social