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

Резултати

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

Пребарај: #usfinance

当前筛选 #usfinance清除筛选
Venture Village Wall 🦄

@venturevillagewall · Post #3964 · 23.01.2025 г., 22:00

Trump Launches National Crypto Strategy 🚨 President Trump has signed an executive order to establish a Presidential Working Group on Digital Asset Markets. This group will push for a robust regulatory framework for cryptocurrencies and stablecoins, and explore the creation of a National Digital Asset Stockpile using seized digital assets. Chaired by crypto advocate David Sacks, the group aims to strengthen U.S. leadership in digital finance and replace previous regulations seen as obstacles to innovation. Full details: Leviathan News #Trump#Crypto#DigitalAssets#Bitcoin#Stablecoins#NationalReserve#USFinance#Blockchain#Innovation#CryptoWorkingGroup

Crypto M - Crypto News

@CryptoM · Post #64737 · 09.04.2026 г., 16:54

🚀 U.S. March Budget Deficit Estimated at $163 Billion The U.S. Congressional Budget Office (CBO) has announced that the budget deficit for March is projected to reach $163 billion. According to BlockBeats, this estimate reflects ongoing fiscal challenges faced by the United States. The CBO's report highlights the financial pressures impacting the federal budget, as expenditures continue to outpace revenues. This development underscores the importance of addressing the nation's fiscal policies to manage the growing deficit effectively. #USBudget#BudgetDeficit#FiscalPolicy#CBO#USFinance#FederalBudget#Economy#MarchDeficit#FinancialReport#USGovernment

Crypto M - Crypto News

@CryptoM · Post #65191 · 11.04.2026 г., 18:19

🚀 U.S. Public Debt Increases by $571.28 Billion, Reaching $38.969 Trillion The United States public debt has increased by approximately $571.28 billion this year, reaching a total of $38.969 trillion as of April 7, 2026. According to NS3.AI, this figure encompasses both debt held by the public and intragovernmental holdings. In an interview with NPR, JPMorgan Chase CEO Jamie Dimon expressed concerns that the growing debt burden could pose challenges, potentially leading to higher market rates and reduced demand for U.S. Treasurys. #USDebt#PublicDebt#USFinance#GovernmentDebt#EconomicNews#USMarkets#Treasury#DebtCrisis#JPMorgan#Macroeconomics

Venture Village Wall 🦄

@venturevillagewall · Post #4357 · 10.03.2025 г., 22:00

Crypto News: Market Decline and Developments 🇺🇸 Sunnyvale Public Safety Officers Association becomes the first U.S. dual-agency to hold Bitcoin on its balance sheet. Joseph Lubin praises U.S. government's reforms, anticipating crypto growth by 2025. President Trump's upcoming executive order may adjust Fed policies for crypto banks and clarify that stablecoins are not securities. FIFA considering a new cryptocurrency, FIFA Coin, to engage 5 billion fans. Coinbase to hire 1,000 workers, citing Trump's positive impact on the crypto industry. Ethereum sees significant outflows totaling $1.8 billion, while total value locked in DeFi drops to $88 million. Bitcoin's price fluctuates between extreme greed and fear, with a current value of $79,000. Ethereum declines below $2000, triggering market fears as total market cap falls by 33%. Current index shows extreme fear since 2022, affecting trader sentiments. #Bitcoin#Crypto#DeFi#TrumpsExecutiveOrder#FIFA#Ethereum#Coinbase#Stablecoins#MarketSentiment#Bullish#Blockchain#Investors#CryptoRegulation#ETH#USFinance#DigitalAssets#CryptoOutflows#FinanceNews