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

Резултати

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

Пребарај: #gdpgrowth

当前筛选 #gdpgrowth清除筛选

አይ ኤምኤፍ የ2026 የኢኮኖሚ ዕድገት ትንበያውን ይፋ አደረገ፤ ኢትዮጵያ በከፍተኛ ዕድገት ቀዳሚነቱን ይዛለች ************************** ዓለም አቀፉ የገንዘብ ድርጅት (IMF) በአውሮፓውያኑ 2026 የሰሃራ በታች አፍሪካ ሀገራትን የኢኮኖሚ ዕድገት ትንበያ ይፋ አድርጓል። በዚህ ትንበያ መሠረት ኢትዮጵያ በ9.2 በመቶ ከፍተኛ ዕድገት በማስመዝገብ ከቀጣናው ሀገራት ቀዳሚነቱን እንደምትይዝ ተመልክቷል። እንደ አይኤምኤፍ ሪፖርት፣ ኡጋንዳ በ7.5 በመቶ፣ ሩዋንዳ በ7.2 በመቶ እንዲሁም ቤኒን በ7.0 በመቶ ዕድገት እንደሚያስመዘግቡ ተተንብዮላቸዋል። በሌላ በኩል እንደ ናይጄሪያ (4.1 በመቶ) እና ደቡብ አፍሪካ (1.0 በመቶ) ያሉ የክፍለ አህጉሩ ግዙፍ ኢኮኖሚዎች ዝቅተኛ የዕድገት ትንበያ ተቀምጦላቸዋል። በመካከለኛው ምስራቅ ያለው ግጭት የነዳጅ እና የማዳበሪያ ዋጋን በመጨመር በበርካታ ሀገራት ላይ የኢኮኖሚ ጫና ቢፈጥርም፣ እንደ ኢትዮጵያ ያሉ ሀገራት ግን አሁንም ጠንካራ የኢኮኖሚ እንቅስቃሴ እንደሚያሳዩ የአይኤምኤፍ ትንበያ ያመላክታል። #IMF#EconomicProjections#Africa#Ethiopia#GDPGrowth#EBC

Crypto M - Crypto News

@CryptoM · Post #64524 · 09.04.2026 г., 06:06

🚀 Thailand's Central Bank Governor Projects GDP Growth for 2026 Thailand's Central Bank Governor has projected the country's GDP growth rate to be between 1.3% and 1.7% in 2026. According to Jin10, this forecast reflects the economic outlook for Thailand as it navigates various domestic and international challenges. The central bank's projection aims to provide guidance for policymakers and investors as they plan for the future economic landscape. #Thailand#CentralBank#GDPgrowth#economicoutlook #2026 #policy#investors

Crypto M - Crypto News

@CryptoM · Post #65385 · 13.04.2026 г., 03:45

🚀 Indonesia's Central Bank Projects 5.2% GDP Growth in Q1 Indonesia's central bank has projected a GDP growth rate of 5.2% for the first quarter, according to Jin10. This forecast reflects the country's economic outlook as it navigates various domestic and international challenges. The central bank's projection aligns with efforts to maintain economic stability and growth amid global uncertainties. The anticipated growth rate is seen as a positive indicator for Indonesia's economic performance in the early part of the year. #Indonesia#CentralBank#GDPGrowth#EconomicForecast#Q12026#EconomicStability#GlobalEconomy#EconomicOutlook

Crypto M - Crypto News

@CryptoM · Post #65152 · 11.04.2026 г., 13:10

🚀 AI TRENDS | Faster AI Progress May Impact U.S. Labor Force Participation by 2050 A recent study conducted by multiple universities suggests that accelerated advancements in artificial intelligence could significantly affect U.S. labor force participation. According to NS3.AI, the research predicts a decline from 62% to 54% by 2050 under a rapid AI development scenario. This scenario also anticipates an annual GDP growth rate of 3.5% between 2045 and 2049. The focus of the debate has shifted to whether AI will generate sufficient new employment opportunities to counterbalance the displacement of existing jobs. #AI#AItrends#USlaborforce#AIdisplacement#GDPgrowth#laborforceparticipation #2050 #futureofwork

Crypto M - Crypto News

@CryptoM · Post #65391 · 13.04.2026 г., 04:34

🚀 Middle East Conflict Could Severely Impact Australia's Economy, Expert Warns Calculations and analyses are currently underway regarding the potential impact of the ongoing Middle East conflict on Australia's fuel prices and economic growth. According to Jin10, David Rumbens, a partner at Deloitte Access Economics, has stated that the worst-case scenario would severely affect Australia. A prolonged conflict could drive oil prices up to $175 per barrel, with inflation rates reaching 7.5% by the end of the year. The ultimate outcome could see Australia's unemployment rate rise to 6.8%, while the GDP growth rate could decline by 2.8%. Notably, none of the proposed scenarios indicate an unemployment rate below 5.0%. #MiddleEastConflict#AustraliaEconomy#FuelPrices#EconomicGrowth#Inflation#Unemployment#GDPGrowth#OilPrices#DavidRumbens#DeloitteAccessEconomics

Crypto M - Crypto News

@CryptoM · Post #64907 · 10.04.2026 г., 08:51

🚀 Austrian Economic Institutes Lower Growth Forecasts Amid Iran Conflict Impact On April 10, two major Austrian economic research institutes announced that the ongoing conflict in Iran is threatening Austria's economic recovery in 2026. According to Jin10, the Institute for Advanced Studies (IHS) has revised its growth forecast for Austria's economy in 2026 down to 0.5% and in 2027 to 0.8%, from previous estimates of 1.0% and 1.1%, respectively. The revision is attributed to soaring energy prices and increased uncertainty. Similarly, the Austrian Institute of Economic Research (WIFO) has adjusted its GDP forecast, projecting growth between 0.2% and 1.1% for 2026, and between 0.4% and 1.5% for 2027, down from earlier predictions of 1.2% and 1.4%. WIFO noted that the current uncertain international environment complicates forecasting efforts. WIFO also anticipates Austria's inflation rate to range between 2.5% and 4.1% in 2026, and between 2.2% and 3.5% in 2027. Meanwhile, IHS forecasts this year's inflation rate at 2.9%, with a decrease to 2.4% in 2027. #Austria#economicforecast#Iranconflict#energyprices#GDPgrowth#inflation#IHS#WIFO#economicrecovery#2026growth#2027forecast#internationaluncertainty