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

TGINSIGHT SIMILAR POSTS

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

Изворен канал @pythonotes · Post #418 · 9 мар.

Оператор pipe позволяет писать более компактный код, реализуя логику объединения данных (Union). Важно помнить, что его поведение зависит от контекста. Побитовые операции (логическое OR) result = 5 | 3 # 5 (0101) | 3 (0011) = 7 (0111) Самое главное - не путать с оператором or, это другое! Объединение множеств set_a = {1, 2, 3} set_b = {3, 4, 5} set_c = set_a | set_b # {1, 2, 3, 4, 5} set_c |= {5, 6} # {1, 2, 3, 4, 5, 6} Слияние словарей dict_1 = {"a": 1, "b": 2} dict_2 = {"b": 3, "c": 4} merged = dict_1 | dict_2 # {'a': 1, 'b': 3, 'c': 4} merged |= {"d": 5} # {'a': 1, 'b': 3, 'c': 4, 'd': 5} Аннотации типов, заменяет Union def process_data(value: int | str) -> None: print(value) Допустимо использовать в isinstance или issubclass isinstance(3, int | float) # True Паттерн-матчинг status_code = 404 match status_code: case 200 | 201 | 204: print("OK") case 400 | 404 | 500: print("ERROR") Для использования в своих классах требуется переопределить метод __or__ Так же нашел библиотеку pipe которая добавляет еще много возможностей. Рекомендую ознакомиться ;) #basic

Hashtags

Резултати

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

Пребарај: #cryptoux

当前筛选 #cryptoux清除筛选

USDE by 👍XBANKING — A Next-Generation Decentralized Stablecoin XBANKING has launched USDE, a new stablecoin built specifically for DeFi, trading, and everyday payments. USDE blends stability, decentralization, and yield — offering 8% APR just for holding. Built on the 🤑 Solana blockchain. 💰USDE minting is now live ➡️app.xbanking.org 👍 1 USDE = 1 USD — always. It’s backed 1:1 by liquid assets — USDT and USDC, with real-time reserves exceeding 101%. 🔎Why hold USDE? ✔️ Earn 8% APR simply by holding — the yield is built into the token. ✔️ No need to chase DeFi protocols or calculate risks — USDE starts earning immediately. ✔️ Use it like any other stablecoin: trade, add to liquidity pools, lend, or borrow. ✔️ 100%+ backed by USDT and USDC — no liquidation risks like with collateralized stablecoins. ✔️ Runs on Solana — fast, cheap, and user-friendly. 😀How does it work? • Users deposit USDT or USDC into the XBANKING smart contract • In return, they receive USDE at a 1:1 ratio • The deposited stablecoins are allocated to DeFi strategies (liquidity pools, farming, etc.) • The yield is distributed among all USDE holders 💼What you can do with USDE ✔️ Hold to earn 8% APR ✔️ Swap to USDT or USDC with zero fees ✔️ Trade on DEXs (available on Raydium) ✔️ Provide liquidity ✔️ Lend and borrow 🛡 What makes USDE stand out? • Backed only by $USDT and $USDC • Reserves exceed 100% • 8% APR just for holding • Minting and burning are controlled via smart contracts • No liquidation mechanisms — unlike collateralized stablecoins • Includes a token freeze function as an additional safeguard against phishing or exploits 📌Where to use USDE — Mint: app.xbanking.org — Smart contract: 8dt9fQhoRKuWCSAsYweG2UMF3rbcG9xzNCTWXXSmdmEi — View on Solscan — DEX: Raydium USDE by XBANKING — a hybrid stablecoin designed for active DeFi use and long-term yield. #USDE#Xbanking#Stablecoin#DeFi#Solana#Raydium#CryptoUX