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

Резултати

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

Пребарај: #paradigm

当前筛选 #paradigm清除筛选
NEWS 鏈新聞-ABMedia

@abmedia_news · Post #24094 · 24.04.2026 г., 04:30

【🚀 商業應用|Paradigm 領投的新創 Succinct 推出 「ZCAM」加密攝影應用程式 】 #Paradigm#SP1zkVM 📍 請見報導: https://abmedia.io/paradigm-backed-succinct-launches-iphone-camera-app-combats-ai-fakes 📍 訂閱鏈新聞頻道:https://linktr.ee/abmedia.io

NEWS 鏈新聞-ABMedia

@abmedia_news · Post #23861 · 14.04.2026 г., 05:30

【🚀 AI 人工智慧|Nous Research 深度解析:Paradigm 押注 10 億估值的去中心化 AI 實驗室,Hermes 模型與 Psyche 網路全面拆解 】 #NousResearch#Paradigm 📍 請見報導: https://abmedia.io/nous-research-paradigm-psyche-solana-hermes-decentralized-ai 🥳 [活動] LBank 推出 80,000 美元新用戶獎勵,慶祝與 Nobody Sausage 達成品牌合作!

NEWS 鏈新聞-ABMedia

@abmedia_news · Post #23617 · 02.04.2026 г., 07:04

【🚀傳統金融|Paradigm 自建預測市場交易終端,計劃涉足造市商業務並開發預測市場指數 】 #Paradigm#PredictionMarkets#Terminal 📍請見報導: https://abmedia.io/paradigm-prediction-markets-trading-terminal-kalshi-polymarket 📍訂閱鏈新聞頻道:https://linktr.ee/abmedia.io

Venture Village Wall 🦄

@venturevillagewall · Post #3989 · 26.01.2025 г., 10:00

Bitcoin Nears Last Growth Phase Bitcoin approaches final growth stage per the Wyckoff method, analyst Ali Martinez notes a potential peak at $200,000. More details on the Wyckoff method and trading here: applied trading. Paradigm calls for Ethereum to focus on scaling and aims for at least one major update yearly without changing gas limits. #Bitcoin#Wyckoff#Crypto#Ethereum#Paradigm#DeFi#VC

Venture Village Wall 🦄

@venturevillagewall · Post #4022 · 29.01.2025 г., 16:00

Funding Boost for D3's Blockchain Launch Domain registration startup D3 secures $25M funding led by Paradigm, with participation from Coinbase Ventures. Funds will support upcoming launch of the Doma blockchain. Read more here. #Blockchain#Funding#Crypto#DomainRegistration#D3#Paradigm#CoinbaseVentures#TechNews#Startups#Investments#DeFi#Web3#Infrastructure#Innovation#VentureCapital#Doma

Crypto M - Crypto News

@CryptoM · Post #65265 · 12.04.2026 г., 12:44

🚀 Paradigm CEO Highlights Gen Z's Impact on Crypto Innovation Paradigm, a crypto investment firm managing approximately $12 billion, is led by co-founder and CEO Matt Huang. According to Odaily, Huang acknowledges that while Gen Z employees can sometimes create chaos, their creativity and technological breakthroughs are impressive. He remains committed to investing in young talent, citing the example of Charlie Noyes, who joined Paradigm at 19 after dropping out of MIT. Noyes played a crucial role in MEV research and Flashbots investment, contributing significantly to the Ethereum ecosystem. Huang likens the Paradigm team to running an 'X-Men Academy,' noting that despite the unpredictability of young employees, their technical skills and innovation often surpass those of traditional professionals. #GenZ#CryptoInnovation#Paradigm#MattHuang#Ethereum#MEV#Flashbots#Investment#YoungTalent#TechBreakthroughs#XMenAcademy#ETH

Venture Village Wall 🦄

@venturevillagewall · Post #4196 · 20.02.2025 г., 04:00

Aptos Accuses Monad of Code Theft Aptos research director Alexander Spiegelman has accused Monad of plagiarizing Aptos' open-source code. Monad co-founder James Hunsaker denied these claims, stating that BlockSTM is an extension and that no Aptos code has been utilized. Meanwhile, Monad recently secured $225M funding led by Paradigm, reaching a $3B valuation. More details: Wu Blockchain News #Aptos#Monad#Blockchain#Investing#Funding#Paradigm#SOL#Ethereum#DeFi#Crypto#VC#Tech#Innovation#OpenSource#FundingRound#Inflation#Protocols#Development#DEX#SecondSwap

Venture Village Wall 🦄

@venturevillagewall · Post #3507 · 19.12.2024 г., 15:57

Monad Ecosystem's Rising Interest The Monad blockchain ecosystem is gaining attention ahead of its launch, focusing on community engagement and innovative projects. Key highlights include: - Event: Demo day showcased 20 projects, co-hosted by Paradigm with a $750k prize pool. - Projects: Noteworthy initiatives included: - Kizzy: A mobile betting platform based on Twitter events. - Sparkball: A team strategy game soon on Steam. - LootGO: A Walk2Earn project, previously overlooked. - Pulse: A health-monitoring bracelet securing $1.8M funding. - Community and Hype: Founders cite strong community support as a major attractor to Monad. - Future Vision: Excitement surrounds Monad’s upcoming testnet and potential partnerships with platforms like TON. #Blockchain#Monad#Crypto#Web3#Gaming#Social#Fundraising#EVMcompatible#Paradigm#DemoDay#Kizzy#Sparkball#LootGO#Pulse#NEOWIZ#Ethereum#Funding#TokenLaunch#Community#Hype