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

Резултати

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

Пребарај: #tplf

当前筛选 #tplf清除筛选
Addis Standard

@addisstandardeng · Post #21267 · 31.01.2026 г., 18:15

#TPLF welcomes #AU call for restraint, reaffirms commitment to dialogue The Tigray People’s Liberation Front (TPLF) has welcomed a call by the Chairperson of the African Union Commission, Mahmoud Ali Youssouf, urging restraint amid renewed tensions in Ethiopia’s Tigray region, reaffirming that dialogue remains the only viable path to resolving outstanding issues with the federal government. In a letter sent late on Saturday and addressed to the AU Commission Chairperson, the TPLF said it appreciates the African Union’s engagement in support of peace and stability in Ethiopia, noting that it takes “positive note” of the AU’s concern over recent developments in Tigray. The party further expressed its readiness to engage constructively in any dialogue initiative facilitated by the African Union, including through the AU High-Level Panel on Ethiopia, aimed at advancing “peace, confidence-building, and reconciliation.” https://addisstandard.com/tplf-welcomes-au-call-for-restraint-reaffirms-commitment-to-dialogue/

Hashtags

Addis Standard

@addisstandardeng · Post #21623 · 05.03.2026 г., 15:34

News: #Tigray rebels say #Ethiopian troops preparing for war Ethiopian federal authorities are preparing "to wage a war against Tigray," a senior official from this northern regional state told AFP on Wednesday, raising fears of a new conflict. Tigray emerged in 2022 from a two-year war that saw federal forces, backed by militias and the Eritrean army, clash with rebels from the Tigray People's Liberation Front (#TPLF). The TPLF dominated Ethiopian politics for some 30 years before current Prime Minister Abiy Ahmed, a non-Tigrayan, took power in 2018. At least 600,000 people were killed in the conflict, according to estimates from the African Union. A ceasefire held for more than two years, but clashes between federal and Tigrayan forces broke out again in November 2025 and January 2026. Large numbers of federal troops have for several weeks been massed at the Tigray border, where.... https://web.facebook.com/AddisstandardEng/posts/pfbid023a9Gk4wS4Zc9q1exiF73ypsGSrQ1ubLT6Pg7Hv5gRNoJDmMEsv8KpNyvcM73Nq8il

Borkena

@borkena · Post #5214 · 08.11.2025 г., 03:01

TPLF Alleges Federal Gov’t “Carried Out Drone Strike on Tigray Forces” Read more. https://borkena.com/2025/11/07/tplf-alleges-federal-govt-carried-out-drone-strike-on-tigray-forces/#Ethiopia#TPLF#Afar

Addis Standard

@addisstandardeng · Post #21794 · 21.03.2026 г., 10:17

#Op_ed: Ghosts of Governance: Opposition paralysis, failure of political imagination in post-war #Tigray The most dangerous moment for a post-war society is when paralysis becomes normal, “a condition that has gripped Tigray for too long,” writes Getachew Gebrekiros Temare. He argues, “War destroyed infrastructure, displaced millions, and shattered institutions,” yet the deeper crisis remains political. Factionalism within the #TPLF and fragmentation among opposition parties have left society without coherent leadership. Opposition rhetoric often functions as controlled dissent rather than driving meaningful change. He notes, “The cumulative consequences of fragmentation, pseudo-analysis, and political hesitation are now impossible to ignore.” Getachew emphasizes that the solution requires “the emergence of a political movement grounded in public interest rather than personal ambition.” https://addisstandard.com/?p=55998

ПретходнаСтраница 1 од 5Следна