Подразумеваемые неймспейсы или неявные пакеты.
Этот функционал добавлен в 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
📊🇺🇸US JOBS REPORT — UNEMPLOYMENT HOLDS AT 4.3% MARCH 2026
🔹178,000 new nonfarm jobs added in March beating economist expectations — labor market remains resilient despite economic headwinds 📈
🏆"America's job market continues to defy economic gravity and global uncertainties" — Labor Secretary commenting on sustained employment strength
📈Wall Street responds positively — major indices rise as investors welcome balanced growth without overheating concerns
✨ More breaking stories coming soon 🚀
#USJobs#Employment#Economy#LaborMarket#America#EconomicData#JobsReport#UnemploymentRate🎯
📊🇺🇸US MARCH JOBS DATA — LABOR MARKET STRENGTH CONTINUES
🔹Unemployment rate steady at 4.3% — maintaining near-historic low levels as economy shows resilience against global headwinds 📈
🔹Job creation beats expectations — one hundred seventy-eight thousand new positions added across diverse sectors nationwide 💼
🎯"American workers are experiencing the strongest job market in decades" — Bureau of Labor Statistics economist analysis
📈Market confidence rises — employment data supports continued economic expansion expectations through 2026
#JobsReport#USEconomy#Employment#LaborMarket#America#WageGrowth#EconomicData#BusinessGrowth🙌
🚀 Bitcoin Rises Over 1.5% Following March CPI Data Release
The Bureau of Labor Statistics (BLS) reported that the Consumer Price Index (CPI) for March increased by 0.9% from the previous month and 3.3% compared to the same period last year, slightly below analyst expectations. According to NS3.AI, the energy index saw a significant rise of nearly 11%, driven by a 21.2% increase in gasoline prices. The CME Group's FedWatch tool indicated a 0% probability of an interest rate cut in April, with a 98.4% likelihood of rates remaining unchanged. In response to the CPI data release, Bitcoin's value increased by more than 1.5%, briefly reaching $73,000.
#Bitcoin#CPI#Inflation#GasPrices#FederalReserve#InterestRates#CryptoNews#FinancialMarkets#BLS#EconomicData#BTC
🚀 Upcoming Release of U.S. and Canadian Economic Data
The U.S. March seasonally adjusted CPI and core CPI monthly rates, along with the unadjusted CPI and core CPI annual rates, are set to be released shortly. According to Jin10, Canada's March employment figures will also be announced in ten minutes.
#US#Canada#EconomicData#CPI#CoreCPI#Employment#MarchData#Inflation
🚀 U.S. Stock Futures Open Lower by Over 1%
U.S. stock futures for the three major indices opened lower by more than 1% on Monday. According to Jin10, this decline reflects growing investor concerns over potential market volatility and economic uncertainties. The drop in futures suggests a cautious start to the trading week, as market participants assess the impact of recent economic data and geopolitical developments. Analysts are closely monitoring these trends to gauge their potential effects on the broader market.
#USStockFutures#MarketVolatility#EconomicUncertainties#StockMarket#GeopoliticalDevelopments#Investors#EconomicData#MarketTrends
🚀 Italy's February Industrial Output Shows Modest Growth
Italy's industrial production for February recorded a modest increase, with a seasonally adjusted monthly growth rate of 0.1%. According to Jin10, this figure fell short of the anticipated 0.5% growth and follows a previous decline of 0.60% in January. The data suggests a slower-than-expected recovery in Italy's industrial sector.
#Italy#industrialproduction#February#growth#Jin10#economicdata#Italyeconomy#slowrecovery
🚀 U.S. March CPI Rises Sharply Amid Conflict with Iran
The U.S. Consumer Price Index (CPI) for March showed a significant increase, driven by soaring gasoline prices due to the ongoing conflict with Iran. According to Jin10, the seasonally adjusted CPI rose by 0.9% month-on-month, marking the largest increase since 2022. Data released on Friday indicated that the CPI climbed 0.9% from February, with the year-on-year growth rate accelerating to 3.3%, the fastest pace since 2024. The U.S. Bureau of Labor Statistics noted that the record surge in gasoline prices contributed nearly three-quarters of the monthly CPI increase. Meanwhile, the core CPI, which excludes food and energy costs, saw a more modest rise of 0.2% month-on-month.
#USCPI#MarchCPI#gasolineprices#Iranconflict#consumerpriceindex#economicdata#inflation#BureauofLaborStatistics#coreCPI#economicgrowth
🚀 Investors May Shift Focus from Geopolitical News to Economic Data, Analyst Suggests
On April 13, Christian Gattiker, Head of Research at Bank Julius Baer, indicated in a research report that investors might be becoming less sensitive to daily Middle Eastern headlines. According to Jin10, Gattiker noted that after weeks of geopolitical dominance in the markets, there is a significant possibility that investors will cautiously return to a more 'normal' market mechanism, focusing on macroeconomic data and corporate fundamentals. Upcoming U.S. producer price data, industrial output figures, and the Federal Reserve's Beige Book are expected to provide insights into inflation dynamics and potential economic momentum.
#Investors#GeopoliticalNews#EconomicData#Macroeconomics#CorporateFundamentals#USProducerPriceData#IndustrialOutput#FederalReserve#Inflation#EconomicMomentum
🚀 U.S. CPI Watch: U.S. CPI Jumps 0.9% in March, Highest Since 2022 as Oil Drives Inflation Surge
Key TakeawaysU.S. CPI rose 0.9% MoM, largest increase since 2022.Inflation hit 3.3% YoY, fastest pace since 2024.Gasoline accounted for ~75% of the monthly increase.Core CPI (ex-food & energy) slowed to 0.2% MoM.Inflation Surges on Energy ShockLatest data from the U.S. Bureau of Labor Statistics shows a sharp acceleration in inflation for March, with headline CPI rising 0.9% month-on-month.This marks the largest monthly increase since 2022, highlighting the growing impact of energy prices on the broader economy.Gasoline Prices Drive Majority of IncreaseThe surge in inflation was overwhelmingly driven by rising fuel costs linked to geopolitical tensions.Key detail:Gasoline contributed nearly three-quarters (~75%) of the CPI increaseThe spike reflects the ripple effects of higher oil prices amid the Iran conflict, which has tightened global energy supply.Yearly Inflation Accelerates to 3.3%On a yearly basis:CPI rose 3.3% YoY, the fastest pace since 2024This suggests inflation pressures are re-accelerating after a period of relative stabilization.Core Inflation Shows Signs of CoolingDespite the headline surge, underlying inflation remains more contained:Core CPI (excluding food and energy): +0.2% MoMThis indicates that:Price pressures are still largely energy-drivenBroader inflation may not yet be fully entrenchedMarket ImplicationsThe data presents a mixed signal for markets:Bullish for rates / USD:Strong headline inflationReinforces “higher-for-longer” Fed stanceNeutral-to-positive for risk assets (conditionally):Core inflation remains controlledSuggests inflation spike may be temporary if energy stabilizesEnergy vs Core Inflation BattleThe key question going forward is whether energy-driven inflation spills into the broader economy.Markets will closely watch:Wage growth trendsCore inflation trajectoryOil price stabilityIf energy pressures persist, inflation could remain elevated. If not, the spike may prove temporary.For now, the data reinforces a macro environment of elevated uncertainty, with inflation increasingly tied to geopolitical developments.
#USCPI#InflationSurge#EnergyShock#GasolinePrices#OilPrices#CoreCPI#GeopoliticalTensions#USInflation#EconomicData#MarketImplications#HigherForLonger#WageGrowth#RiskAssets#OilPriceStability#2024Inflation