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

TGINSIGHT SIMILAR POSTS

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

Изворен канал @pythonotes · Post #205 · 22 јан.

Как работает функция reload()? Эта функция нужна для того, чтобы перезагрузить изменившийся код из py-файла без рестарта интерпретатора. Дело в том, что любой импортированный модуль при повторном импорте не будет перечитывать файл. Функция импорта вернёт уже загруженный в память объект модуля. Чтобы обновить код, нужно либо перезапустить всю программу, либо использовать функцию reload() from importlib import reload reload(my_module) 🔸 Функция reload() принимает в качестве аргумента только объект модуля или пакета. Она не может перезагрузить класс или функцию. Только весь файл целиком! 🔸 Перезагрузка пакета перезагрузит только его файл __init__.py, если он есть. Но не вложенные модули. 🔸Она не может перезагрузить ранее не импортированный модуль. 🔸При вызове функция reload() перечитывает и перекомпилирует код в файле, создавая новые объекты. После создания новых объектов перезаписывается ранее созданный неймспейс этого модуля. Это значит, что если где-то этот модуль импортирован через import и обращение к атрибутам происходит через неймспейс (имя) модуля, то такие атрибуты обновятся. Если какие-либо объекты из этого модуля импортированы через from то они будут ссылаться на старые объекты. Напишем простой модуль # mymodule.py x = 1 Теперь импортируем модуль и отдельно переменную х из модуля >>> import mymodule >>> from mymodule import x >>> print(mymodule.x) 1 >>> print(x) 1 Не перезапуская интерпретатор вносим изменения в модуль # mymodule.py x = 2 Делаем перезагрузку модуля и проверяем х ещё раз >>> reload(mymodule) >>> print(mymodule.x) 2 >>> print(x) 1 То же самое будет если присвоить любой объект переменной (даже словарь или список) Повторный импорт обновляет значение >>> from mymodule import x >>> print(x) 2 🔸Созданные инстансы классов не обновятся после перезагрузки модуля. Их придётся пересоздать. #tricks#basic

Резултати

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

Пребарај: #sei

当前筛选 #sei清除筛选
American Crypto©

@americancryptotrading · Post #27568 · 25.03.2026 г., 11:03

🇺🇸#SEI/USDT has found support at the lowerborder of the descendingchannel on the 3D timeframe👀 Looks good for the midterm✈️ American Crypto©

Hashtags

American Crypto©

@americancryptotrading · Post #27532 · 12.02.2026 г., 09:45

🇺🇸#SEI/USDT is currently consolidating inside the descendingchannel formation on the 3D timeframe👨‍💻 Accumulate before the rocket takes off📈 American Crypto©

Hashtags

American Crypto©

@americancryptotrading · Post #27495 · 07.01.2026 г., 11:51

🇺🇸#SEI/USDT is holding above the lowerboundary of the descendingchannel formation on the 3D timeframe💁‍♂️ Strong upside potential on a bounce🚀 American Crypto©

Hashtags

American Crypto©

@americancryptotrading · Post #27414 · 22.10.2025 г., 08:58

🇺🇸#SEI/USDT is consolidating inside the descendingchannel pattern on the 3D chart🧐 A breakout will bring a huge rally🐃 American Crypto©

Hashtags

American Crypto©

@americancryptotrading · Post #27360 · 30.08.2025 г., 08:46

🇺🇸#SEI/USDT has retested the s/rzone on the 2D timeframe👀 Time to bounce and rally🚀 American Crypto©

Hashtags

American Crypto©

@americancryptotrading · Post #27163 · 22.02.2025 г., 12:16

🇺🇸#SEI/USDT is facing the upperborder of the fallingwedge formation on the daily chart🔍 Bullish case if we break above the one🚀 American Crypto©

Hashtags

Bitcoin Bullets®

@bitcoinbuliets · Post #14217 · 10.05.2026 г., 20:05

#SEI Market Analysis SEI/USDT showing strong bullish momentum with price near the upper Bollinger Band and MACD confirming upward trend. RSI above 76 signals overbought conditions but doesn't negate short-term strength. Holding above 0.0591 supports continuation toward resistance at 0.0620. Bear case triggers below 0.0585, risking a deeper pullback to key supports near 0.0579. Watch 0.0591 as the pivot for bulls and bears. --- ➖➖➖➖➖➖➖ Bitcoin Bullets® Trading

Hashtags

Bitcoin Bullets®

@bitcoinbuliets · Post #14146 · 09.05.2026 г., 20:05

#SEI Market Analysis SEI/USDT showing strong bullish momentum with MACD confirming upside and RSI stretched near 74 signaling overbought conditions. Price hugging the upper Bollinger Band suggests continuation but warns of a short-term pullback. Bull case: Hold above 0.0586 to target 0.0620 and beyond. Bear case: Break below 0.0575 risks deeper correction toward 0.0550. Key level to watch: 0.0586 support. --- ➖➖➖➖➖➖➖ Bitcoin Bullets® Trading

Hashtags

Bitcoin Bullets®

@bitcoinbuliets · Post #13522 · 22.04.2026 г., 20:03

#SEI Market Analysis SEI/USDT holding a strong bullish structure with MACD confirming momentum and RSI pushing into overbought territory near the upper Bollinger Band. Price is well above key supports, showing solid demand on dips. Bull case: Hold above 0.055, targeting a test of 0.059 resistance. Bear case: Lose 0.054 support, risk deeper pullback toward 0.05385. Watch 0.055 closely for trade direction. --- ➖➖➖➖➖➖➖ Bitcoin Bullets® Trading

Hashtags

Bitcoin Bullets®

@bitcoinbuliets · Post #13511 · 22.04.2026 г., 04:03

#SEI Market Analysis SEI/USDT is in a weak bearish trend but shows short-term bullish signals with MACD turning positive and RSI near 61. Price is testing resistance near 0.056 and trading close to the upper Bollinger Band, indicating potential exhaustion. Bull case: hold above 0.056, targeting 0.059 for a relief bounce. Bear case: lose 0.055 and risk a deeper pullback toward the 0.053 support zone. Key level to watch: 0.056. --- ➖➖➖➖➖➖➖ Bitcoin Bullets® Trading

Hashtags

Bitcoin Bullets®

@bitcoinbuliets · Post #13219 · 04.04.2026 г., 04:09

#SEI Market Analysis SEI/USDT shows a weak bearish structure with price hovering near resistance at 0.05496 and RSI steady around 54. MACD is bullish and price trades in the upper half of the Bollinger Bands, signaling potential short-term strength. Bull case: hold above 0.05375 to target 0.05558 resistance. Bear case: lose 0.0509 support and risk a deeper pullback toward 0.0486. Key level to watch: 0.05375. --- ➖➖➖➖➖➖➖ Bitcoin Bullets® Trading

Hashtags

Bitcoin Bullets®

@bitcoinbuliets · Post #13215 · 03.04.2026 г., 20:09

#SEI Market Analysis SEI/USDT shows a weak bearish structure but MACD is turning bullish, signaling potential short-term strength. Price is near the upper Bollinger Band with RSI around 59, indicating room to run but also caution for a squeeze. Bull case: hold above 0.05496 for a push to 0.05595 resistance. Bear case: lose 0.0509 support and risk a deeper drop to 0.0486. Key level to watch: 0.05496. --- ➖➖➖➖➖➖➖ Bitcoin Bullets® Trading

Hashtags

ПретходнаСтраница 1 од 3Следна