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

Резултати

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

Пребарај: #tokenizedassets

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

@CryptoM · Post #64712 · 09.04.2026 г., 15:35

🚀 Enhanced Labs Secures $1 Million in Pre-Seed Funding for DeFi Expansion DeFi solutions provider Enhanced Labs has announced the successful completion of a $1 million pre-seed funding round. According to Odaily, the round was led by Maximum Frequency Ventures, with participation from GSR, Selini, Flowdesk, and a group of angel investors. The newly acquired funds are expected to support product development and operations, as well as expand options-based yield strategies to a broader range of on-chain assets, including tokenized real-world assets. #DeFi#Funding#PreSeed#Crypto#Blockchain#YieldFarming#TokenizedAssets#Startup#Investment#CryptoNews

Crypto M - Crypto News

@CryptoM · Post #64710 · 09.04.2026 г., 15:29

🚀 Securitize Appoints Brett Redfearn as President Amid $3.9 Billion Tokenized Asset Management Securitize has announced the appointment of Brett Redfearn, a former executive at the SEC and JPMorgan, as its new president. According to NS3.AI, Redfearn will also join the company's board of directors. This strategic move comes as Securitize manages $3.9 billion in tokenized assets, based on data from RWA.xyz. Redfearn's extensive experience in financial regulation and asset management is expected to bolster Securitize's leadership team and enhance its operations in the rapidly evolving digital asset sector. #Securitize#BrettRedfearn#TokenizedAssets#DigitalAssets#AssetManagement#FinancialRegulation#Leadership#Blockchain#FinTech

Crypto M - Crypto News

@CryptoM · Post #64749 · 09.04.2026 г., 17:59

🚀 Tokenized RWA Market Expected to Reach $400 Billion by 2030 The distributed tokenized real-world asset (RWA) market is projected to expand significantly, growing from approximately $29 billion today to $400 billion by 2030. According to NS3.AI, a report by Keyrock and Securitize highlights this anticipated growth, noting that RWA perpetual futures volumes have increased 40 times over six months, reaching $67 billion in monthly volume. Additionally, the report indicates that tokenized Treasury bills offered higher returns than DeFi's benchmark stablecoin lending rate on 98% of days in the first quarter of 2026. #TokenizedAssets#RWA#DeFi#Blockchain#FinancialMarkets#TreasuryBills#DigitalFinance#CryptoFinance#InvestmentTrends#FinTech

Crypto M - Crypto News

@CryptoM · Post #65379 · 13.04.2026 г., 03:19

🚀 Bank of Korea Nominee Advocates for CBDCs and Stablecoins in Digital Currency Ecosystem Shin Hyun-song, the nominee for the governor of the Bank of Korea, has emphasized the importance of Central Bank Digital Currencies (CBDCs) and commercial bank deposit tokens in shaping the digital currency ecosystem. According to NS3.AI, Shin expressed support for a stablecoin denominated in the domestic won, highlighting that maintaining trust in the currency is paramount. He also noted that stablecoins could facilitate the exchange of tokenized assets and coexist alongside deposit tokens. #BankofKorea#CBDC#Stablecoins#DigitalCurrency#ShinHyunSong#CentralBankDigitalCurrencies#CommercialBankTokens#TokenizedAssets#StablecoinWon#DigitalCurrencyEcosystem