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

Резултати

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

Пребарај: #fil

当前筛选 #fil清除筛选
Coin Sonar

@CoinSonar · Post #243408 · 17.04.2026 г., 01:50

#FIL | Volume spike (USDT PAIR) 58 times the average volume 258.06K USDT traded in 1 min └Buying vol: 179.20K USDT 🟢 Boost score: 5/10 24h Vol: 6.40M USDT (Binance) Price: 0.984 (-1.4% in 24h)

Hashtags

Pro Analysis

@proanalysistrader · Post #28045 · 21.10.2024 г., 13:07

#FIL/USDT analysis : #FIL is currently in an uptrend, consistently making higher highs (HHs) and higher lows (HLs) along the trendline. The price is now retracing towards the 200 EMA, presenting a potential long trade opportunity. The target should be the previous high levels, as the price is anticipated to rise further. TF : 1D Entry : $3.888 Target : $4.662 SL : $3.366

Hashtags

American Crypto©

@americancryptotrading · Post #27613 · 08.05.2026 г., 08:21

🇺🇸#FIL/USDT is approaching the midline of the descendingchannel formation on the 3D chart💁‍♂️ Looking for a rise✈️ American Crypto©

Hashtags

American Crypto©

@americancryptotrading · Post #27570 · 27.03.2026 г., 10:40

🇺🇸#FIL/USDT is printing the descendingchannel formation on the 2W timeframe👨‍💻 A strong rally is approaching🚀 American Crypto©

Hashtags

American Crypto©

@americancryptotrading · Post #27525 · 05.02.2026 г., 11:46

🇺🇸#FIL/USDT has found support at the lowerboundary of the descendingchannel formation on the 3D chart👨‍💻 Looking for a leg upward📈 American Crypto©

Hashtags

American Crypto©

@americancryptotrading · Post #27490 · 03.01.2026 г., 11:17

🇺🇸#FIL/USDT is rebounding from the lowerborder of the descendingchannel pattern on the 3D chart👨‍💻 Bounce will bring a huge rally🐃 American Crypto©

Hashtags

American Crypto©

@americancryptotrading · Post #27457 · 02.12.2025 г., 10:25

🇺🇸#FIL/USDT is currently shaping the descendingchannel formation on the weekly chart👨‍💻 Send it if we break out🚀 American Crypto©

Hashtags

American Crypto©

@americancryptotrading · Post #27378 · 17.09.2025 г., 09:00

🇺🇸#FIL/USDT is hovering above the broken descendingresistance line on the daily timeframe🧐 A pump is expected📈 American Crypto©

Hashtags

American Crypto©

@americancryptotrading · Post #27268 · 02.06.2025 г., 09:38

🇺🇸#FIL/USDT is retesting the broken descendingresistance line on the daily timeframe🔍 Time to rally🐃 American Crypto©

Hashtags

American Crypto©

@americancryptotrading · Post #27164 · 23.02.2025 г., 19:18

🇺🇸#FIL/USDT has found support at the lowerborder of the descendingtriangle formation on the weekly chart👀 Time to bounce and rally📈 American Crypto©

Hashtags

American Crypto©

@americancryptotrading · Post #27096 · 24.12.2024 г., 15:01

🇺🇸#FIL/USDT is retesting broken descendingresistance on the weekly chart🧐 Looking for a rise✈️ American Crypto©

Hashtags

123•••56
ПретходнаСтраница 1 од 6Следна