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

Резултати

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

Пребарај: #fromdogalitoadwa

当前筛选 #fromdogalitoadwa清除筛选
Red Nile

@rednile12 · Post #10886 · 26.01.2026 г., 17:20

🔺Continuation from above @rednile12 🔷Ras Alula’s Warning — and Italy’s Defiance Deeply angered by the occupation, Ras Alula Abanega, the most formidable general of Emperor Yohannes IV, sent a formal letter to the Italian commander General Genè, demanding that Italian forces vacate Ethiopian territory. ❗️ Italy refused. General Genè responded that he had no authorization from Rome to withdraw, and instead advanced inland toward Saati, where Italian forces began building fortifications—a clear signal that Italy intended permanent occupation. 🔷The Battle Ras Alula immediately mobilized his forces. Moving swiftly from the highlands, he confronted the Italian column at Dogali, a narrow and exposed terrain ideal for Ethiopian tactics. 🔹 Italian force: ~550 soldiers 🔹Ethiopian force: Larger, mobile, and battle-hardened 🔹Result: ▪️~470 Italian soldiers killed ▪️~80 wounded ▪️The Italian column was almost entirely annihilated This was not a skirmish—it was a strategic humiliation. 🔷Shockwaves in Italy and the Western Press 🔹Italian Press Reaction The defeat sent shockwaves through Italy. ▪️Newspapers such as La Tribuna and Corriere della Sera described Dogali as a “national tragedy” ▪️The fallen soldiers were quickly turned into martyrs of empire ▪️Public outrage fueled calls for revenge, not withdrawal Instead of questioning colonial aggression, the Italian press framed the defeat as: ▪️ A stain on national honor ▪️ Proof that Italy needed more troops, more funding, and harsher measures This reaction directly paved the way for Italy’s militarization of Eritrea and its later full-scale invasion of Ethiopia—culminating in Adwa (1896). 🔷Western Media Narrative Much of the broader European press reacted with disbelief. ▪️ Ethiopia’s victory contradicted the racist colonial assumption that African armies could not defeat Europeans ▪️ Some Western outlets downplayed Ethiopian strategy and leadership, attributing the loss to: ▪Italian “mismanagement” ▪Poor logistics ▪Terrain 🔹 Rarely did they acknowledge: ▪️Ras Alula’s military brilliance ▪️Ethiopia’s organized command structure ▪️Indigenous intelligence and strategy Yet privately, Dogali triggered a quiet realization in Europe: Ethiopia was not a weak state—it was a serious military power. 🔷Why Dogali Matters Dogali was: ▪️One of the first major African victories over a modern European army ▪️A psychological blow to colonial arrogance ▪️A direct precursor to Adwa, where Italy would suffer an even greater defeat ▪️It proved that Ethiopian resistance was not accidental, but systematic, strategic, and national. መብቱን ዮሐንስ ላሉላ ቢሰጠው እንደ ቀትር እሳት ቱርክን ገላመጠው ጣሊያንም ወደቀ እያንቀጠቀጠው አጭዶና ከምሮ እንደገብስ አሰጣው።» Photo Descriptions Image 1: Ras Alula Abanega, architect of the victory at Dogali Image 2: Italian troops burying their dead after the defeat (January–February 1887) Image 3: Wounded Italian soldiers transported back to Italy and treated in Naples — RedNile Media🌊🧭 📡@rednile12 Geopolitics | Multipolarity | Sovereignty | Strategic Reality #RedNileMedia#EthiopiaFirst #BattleOfDogali#AdwaVictory #FromDogaliToAdwa #HistoryBeyondTheWest

Red Nile

@rednile12 · Post #10888 · 26.01.2026 г., 18:32

The Strategic Containment of an Empire: How Europe Engineered Ethiopia's Landlocked Fate Red Nile Media | Deep Dive Analysis The story of Ethiopia in the late 19th and early 20th centuries is often celebrated as a heroic narrative of military triumphs at #Dogali (1887) and #Adwa (1896). Yet, a closer examination reveals a far more complex geopolitical saga. These victories did not translate into unbridled sovereignty; rather, they triggered a deliberate and coordinated European strategy of containment. The culmination of this strategy was the 1906 Tripartite Treaty—a formal pact that sealed Ethiopia’s landlocked destiny. 📌 This article expands on that history, incorporating academic perspectives to illuminate the “how” and “why” behind this enduring geopolitical outcome. 🔗Read the Full Article Here #RedNileMedia#EthiopiaFirst #BattleOfDogali#AdwaVictory #FromDogaliToAdwa #HistoryBeyondTheWest