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

Резултати

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

Пребарај: #nansen

当前筛选 #nansen清除筛选
Crypto M - Crypto News

@CryptoM · Post #64891 · 10.04.2026 г., 07:14

🚀 Ethereum and Chainlink Whales Accumulate Ahead of U.S. CPI Release According to NS3.AI, recent data from Santiment reveals that Ethereum whale wallets have accumulated 500,000 ETH, valued at approximately $1.09 billion, just before the release of the U.S. Consumer Price Index (CPI). In a similar move, Chainlink whale wallets have added 1.89 million LINK, worth about $16.93 million. Meanwhile, Nansen data indicates that Uniswap whale wallets have reduced their holdings by 2.48% over the past week, equivalent to around 90,000 UNI, as traders brace for potential volatility in response to the upcoming inflation report. #Ethereum#Chainlink#Whales#CPI#Uniswap#ETH#LINK#UNI#Inflation#Santiment#Nansen

Venture Village Wall 🦄

@venturevillagewall · Post #4197 · 20.02.2025 г., 07:00

AI Infrastructure Opportunities Emerging! New potential for large-scale AI infrastructure projects! 🤖🔗 While fears of AI replacing humans persist, the reality shows a need for collaboration. Specialized platforms are essential for this interaction. Check out inspirations for creating your own platform here. Additionally, Nansen analysts report that 15,431 wallets experienced significant profit/loss on LIBRA: 86% lost $251M, while a few gained $180M. Recent crypto updates: BTC ETF outflow: $64M, ETH ETF inflow: $19M. During the last 24 hours, 74K traders were liquidated, totaling $139M. Largest liquidation: ETH/USDT at $2M on Binance. #AI#Crypto#VC#Blockchain#Investment#Finance#Tech#DataScience#MarketTrends#Nansen#Wallets#LIBRA#BTC#ETH#Liquidation#ETFs#ProfitLoss#Infrastructure#Innovation#DigitalEconomy#Trading

Venture Village Wall 🦄

@venturevillagewall · Post #4198 · 20.02.2025 г., 10:00

Traders Face Major Losses with LIBRA Coin Nansen research reveals that 86% of LIBRA coin traders lost money, totaling $251 million in investor losses. Meanwhile, insiders profited over $100 million from the token issuance. For more details, visit CoinDesk. #LIBRA#Argentina#Crypto#Investors#Losses#Trading#Nansen#Market#Finance#Tokens#Wealth#Volatility#DeFi#Research#Blockchain#Memecoin#VC#Funds#Loss#Insiders#TradingStrategy

Venture Village Wall 🦄

@venturevillagewall · Post #3837 · 10.01.2025 г., 10:00

Alternatives vs. Altcoin Market Perspectives 🔍 CEO of CryptoQuant, Ki Yun Joo, labels the altcoin market as a 'zero-sum game' due to stagnant capital influx. He suggests only projects with robust use cases can survive. 🚀 Citi analysts forecast a potential alt season with Trump's return, benefiting Ethereum through ETF capital rotation. 📊 Nansen integrates TON blockchain data, offering real-time metrics for the Web3 ecosystem. 💰 CleanSpark becomes the fourth public miner with over 10,000 BTC, reaching this milestone by mining directly. 📈 Ripple aims to list its new RLUSD stablecoin on major exchanges, including ongoing talks with Coinbase and Binance. Bitstamp recently announced support for RLUSD. #Altcoins#Crypto#Ethereum#ETFs#TON#Web3#CleanSpark#Bitcoin#Ripple#RLUSD#Citi#CryptoQuant#Nansen#Blockchain#Mining#Exchange#Bitstamp#CapitalRotation#AltSeason#DonaldTrump#DataAnalytics

Crypto M - Crypto News

@CryptoM · Post #65295 · 12.04.2026 г., 15:15

🚀 Crypto Analyst Manya Releases Research Tool Rankings Crypto analyst manya has released a ranking of personal research tools. According to ChainCatcher, the rankings categorize tools into different levels based on their effectiveness. The S-tier includes Dune and frontrun.pro, while the A-tier features Coinglass, RootData, Drop, MetaSleuth, and DefiLlama. B-tier tools comprise Arkham, Bubblemaps, Dexscreener, Surf, Nansen, and CoinMarketCap. C-tier tools include Cryptorank and others. #CryptoAnalyst#ResearchTools#CryptoRanking#Dune#frontrunpro#Coinglass#RootData#Drop#MetaSleuth#DefiLlama#Arkham#Bubblemaps#Dexscreener#Surf#Nansen#CoinMarketCap#Cryptorank