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

TGINSIGHT SIMILAR POSTS

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

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

Подразумеваемые неймспейсы или неявные пакеты. Этот функционал добавлен в Python 3.3 Что он означает? Ранее, до 3.3 пакетами считались лишь директории, в которых есть файл __init__.py. Этот файл одновременно являлся свидетельством того, что директория это Python-пакет, и служил "телом" этого пакета. То есть местом, где можно написать код, как это делается внутри модуля. Этот код исполняется в момент импорта пакета, так что его принято называть "код инициализации пакета". Начиная с версии 3.3 Любая директория считается пакетом и Python будет пытаться использовать любую директорию для импорта. Конечно, не любую в файловой системе, а только те что находятся в sys.path. Это значит, что теперь __init__.py нужно делать только если: 🔸 вам требуется создать код инициализации пакета 🔸 нужна совместимость со старыми версиями Python На мой взгляд это немного упрощает разработку, делает её чище, но с другой стороны убивает некоторую однозначность происходящего. Например, я создал репозиторий со своей библиотекой и рядом положил код примеров или тестов. repo_name/ my_library/ __init__.py main.py examples/ exam1.py exam2.py В этом репозитории пакетом является только my_library, остальные директории это не пакеты, это просто дополнительный код в файлах. Директория examples не добавлена в sys.path, в ней нет рабочих модулей. Но если она лежит рядом с my_library, то Python вполне сможет импортнуть из неё модули, так как посчитает что examples это валидный пакет. Конечно, пример несколько надуманный. Никто не будет добавлять корень репозитория в sys.path. Но, я думаю, суть ясна. Иногда директория это просто директория а не пакет! #basic#pep

Hashtags

Резултати

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

Пребарај: #dokwon

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

@abmedia_news · Post #24121 · 25.04.2026 г., 04:01

【🚀 交易市場|Jane Street 請求法院駁回 Terraform Labs 對 UST 崩盤之索賠訴訟 】 #DoKwon#LUNA 📍 請見報導: https://abmedia.io/jane-street-asks-court-to-reject-terraform-claims-tied-to-ust-luna-crash 📍 訂閱鏈新聞頻道:https://linktr.ee/abmedia.io

Hashtags

Venture Village Wall 🦄

@venturevillagewall · Post #3730 · 27.12.2024 г., 16:00

Do Kwon Extradited to the USA Montenegro's Justice Minister Bojan Bozovic has ordered the extradition of Do Kwon, founder of Terra, to the United States. This comes after the court denied Kwon's appeal against extradition. Kwon remains under scrutiny for alleged fraud amounting to $4.47 billion, and was arrested in March 2023. His extradition allows U.S. authorities to pursue charges related to investor deception and wealth concealment. For more details, check the full report here. #Terra#LUNA#DoKwon#crypto#extradition#Montenegro#law#fraud#SEC#blockchain

Venture Village Wall 🦄

@venturevillagewall · Post #3832 · 09.01.2025 г., 19:00

Major Crypto Transactions and Updates Today! 🚨 Significant XLM Transfers: 46,885,889 #XLM ($18.6M) and 68,463,954 #XLM ($27.2M) moved to SDF Operations. 🤑 0G Foundation raises $30M selling AI nodes, distributing up to 15% of token supply over 3 years. More Details 🔄 Key metrics identified by CryptoQuant for Bitcoin's price recovery. Link 👀 US authorities approved the sale of Silk Road Bitcoins worth $6.58B. Link 📈 Binance reports over 250 million users. Link 🧑‍⚖️ Trial for Terra's Do Kwon set for 2026. Link 🔉 Circle donates $1 million in USDC to Trump's inauguration committee. Link #XLM#AI#Crypto#VC#DeFi#Bitcoin#Ethereum#Trading#Investment#Blockchain#Finance#Security#Circle#DonaldTrump#Fundraising#SilkRoad#Binance#Terra#DoKwon#CryptoQuant

Venture Village Wall 🦄

@venturevillagewall · Post #3780 · 03.01.2025 г., 10:00

Bitcoin Turns 16: Celebrating Blockchain's Birth 🎉 Bitcoin celebrates its 16th anniversary today, marking the generation of its genesis block on January 3, 2009, by Satoshi Nakamoto. This milestone began a monetary revolution focused on decentralization and sovereignty. 🔗 Read more: Celebrating Bitcoin 🔗 Earlier report: Identity of Satoshi Nakamoto Revealed? ⚖️ On a legal note, Do Kwon faces serious accusations including fraud and money laundering, with a potential prison sentence of 130 years if convicted. His next court hearing is set for January 8. 🔗 More on Kwon: Reuters 🔮 Experts predict significant developments for cryptocurrency and AI integration by 2025, with Bitcoin potentially hitting $500,000. #Bitcoin#SatoshiNakamoto#DoKwon#Terra#Crypto#Blockchain#Fraud#MoneyLaundering#AI#VC#Economy #2025 #Cryptocurrency#Investment#BlockchainTechnology#Legal#Innovation#Milestone#Anniversary#Decentralization#PeerToPeer

Venture Village Wall 🦄

@venturevillagewall · Post #3824 · 08.01.2025 г., 22:00

Cuban Prefers Bitcoin Over Gold in Crisis Billionaire Mark Cuban states he prefers holding Bitcoin over gold in economic downturns, citing higher value potential. In Q4 2024, MicroStrategy purchased 194,180 BTC. Companies like KULR Technology, Rumble, and Genius Group are also adding Bitcoin to their balance sheets. Meanwhile, Do Kwon faces trial in 2026 for TerraUSD's $40 billion collapse. Additionally, 50 million USDC was burned at USDC Treasury. Analysts from Fidelity Digital Assets predict significant Bitcoin growth in 2025, potentially driven by countries accumulating Bitcoin as strategic reserves. #Bitcoin#Crypto#VC#MarkCuban#MicroStrategy#KULR#Rumble#GeniusGroup#DoKwon#TerraUSD#USDC#Fidelity#ETB#DigitalAssets#EconomicCrisis#Forecast#Cryptocurrency

Venture Village Wall 🦄

@venturevillagewall · Post #3858 · 12.01.2025 г., 19:00

Weekly Crypto Market Highlights 🔹 Crypto market shows volatility amid stock decline. 🔹 US Justice Department authorized sale of Silk Road bitcoins. 🔹 Court sets hearing date for Do Kwon's case. 🔹 Charges filed against operators of crypto mixers Blender and Sinbad. 🔹 In Russia, record crypto seizure to be used for state income. Read more in the full ForkLog Digest. #Crypto#Bitcoin#DoKwon#SilkRoad#Blender#Sinbad#Russia#WeekInReview#MarketVolatility#US#Justice#KYC#DeFi#Cryptocurrency#MarketOverview#Blockchain#AML#Regulation#News#ForkLog