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

Резултати

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

Пребарај: #exchanges

当前筛选 #exchanges清除筛选
以太坊区块链新闻| ETH 以太币圈热瓜

@ethereumglobalnews · Post #1372 · 17.11.2025 г., 05:58

🪙242.9K ETH withdrawn from CEXs this week#OnChain#Exchanges Coinglass 數據顯示,過去 7 天共有約 24.29 萬枚 ETH 從中心化交易所流出,其中 Binance、Bitfinex、Coinbase Pro 均錄得顯著減少,顯示部分持幣者正從交易所轉往自託管或鏈上配置。 #Ethereum#DeFi#Markets#Crypto ⚡ 交易所庫存下降通常意味短線拋壓減弱,但後續能否轉為有效需求仍需觀察鏈上活躍度。 👍@Web3NewsInsight 🥲 🥲Follow for more Web3 News 🤣

DWF Labs Broadcast

@Dwflabs · Post #17 · 24.08.2022 г., 12:59

Since the beginning of the financial markets, traders and investors have mostly paid attention to the price of their assets and hoped to see “green numbers”. Indeed, the pricing of a stock or a cryptocurrency is one of the most important metrics of any investment. But what if only a couple of people were trading such an asset providing neither volume nor liquidity? Find out more about DWF Labs Market Making, OTC Liquidation and Venture Capital for #Web3#crypto projects. #cryptocurrency#venturecapital#markets#projects#investment#trading#exchanges#blockchain https://www.linkedin.com/pulse/how-avoid-dangers-crypto-death-spiral-dwf-labs/

Crypto M - Crypto News

@CryptoM · Post #65250 · 12.04.2026 г., 10:15

🚀 North Korean Crypto Theft Funds Military Expenditures, Experts Warn Security experts have highlighted that cryptocurrency theft is increasingly being used to finance North Korea's military activities. According to NS3.AI, researchers have observed a months-long infiltration targeting Drift Protocol, indicating a shift in North Korean operations. These activities have expanded beyond phishing to include attacks on exchanges, wallet services, and key permission holders of DeFi protocols. #NorthKorea#CryptoTheft#MilitaryExpenditures#SecurityExperts#NS3AI#DriftProtocol#Phishing#Exchanges#WalletServices#DeFiProtocols

Venture Village Wall 🦄

@venturevillagewall · Post #3596 · 20.12.2024 г., 14:18

EU Tightens Crypto Regulations 🔵 EU crypto exchanges must delist $USDT by December 30 due to the Markets in Cryptoassets regulation. This ban aims to restrict cash usage but may push users towards DEX and other stablecoins. Centralized exchanges are in a race to comply by the deadline. More details in the regulation here. Join the discussion on CryptoTwitter🦢 #EU#Regulation#Crypto#USDT#Exchanges#MarketsInCryptoassets#DEX#Stablecoins#Cash#Compliance#Ban#Deadline#Investment#Blockchain#Technology#DigitalAssets#Finance#MarketTrends

Venture Village Wall 🦄

@venturevillagewall · Post #3926 · 20.01.2025 г., 04:00

Melania Meme Token Debuts on Major Exchanges Centralized exchanges like MEXC, BingX, Gate, and Bitget list Melania Meme (MELANIA) token. The token's economic model: 35% team share (30-day lock), 20% treasury, 20% community, 15% public offering, 10% liquidity. Major transaction: an address bought 3.8M MELANIA for 800k USDC, now with a profit of $38.6M. Read more: Wu Blockchain News #Crypto#MemeToken#MELANIA#TrumpProject#Dogecoin#Bitcoin#Profit#Exchanges#Trading#Finance#USDC#MarketAnalysis#Tokenomics#Investment#TradingStrategy#Speculation#ProfitableAddresses#MarketTrends#Blockchain#Web3#VC

Venture Village Wall 🦄

@venturevillagewall · Post #4242 · 25.02.2025 г., 16:00

OKX Settles Dispute with US DOJ 🕊OKX settles dispute with the US Department of Justice, admitting fault for operating without a license. The exchange will pay $84 million in fines and forfeit $421 million in commissions from US clients. This settlement marks a pivotal point for OKX, allowing continued collaboration with regulators to enhance solutions for clients and the crypto market. Details:OKX Announcement 🟠 In related news, $635 million in leveraged Bitcoin positions were liquidated within 24 hours. #Crypto#Bitcoin#OKX#Regulations#Compliance #OKX#Crypto#Bitcoin#Finance#Regulations#Compliance#Investment#Blockchain#US#Litigation#Trading#Market#Fines#Exchanges#Leveraged#Settlement#Lawsuits#Justice#USDOJ#CryptoMarket