TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #60 · 31 мар.

Вторая по частоте future-функция, которую я использовал, это абсолютный импорт from __future__ import absolute_import Что она делает? Изменения, которые вносит эта инъекция описаны в PEP328 Покажу простой пример. Допустим, есть такой пакет: /my_package /__init__.py /main.py /string.py Смотрим код в my_package/main.py # main.py import string Простой пример готов) Вопрос в том, какой модуль импортируется в данном случае? Есть два варианта: 1. модуль в моём пакете my_package.string 2. стандартный модуль string И вот тут вступает в дело приоритет импортов. В Python2 порядок следующий: помимо иных источников, раньше ищется модуль внутри текущего пакета, а потом в стандартных библиотеках. Таким образом мы импортнём my_package.string. Но в Python3 это поведение изменилось. Если мы указываем просто имя пакета, то ищется именно такой модуль, игнорируя имена в текущем пакете. Если мы хотим импортнуть именно подмодуль из нашего пакета то, мы должны теперь явно это указывать. from my_package import string или относительный импорт, но с указанием пути относительно текущего модуля main from . import string Еще одной неоднозначностью меньше 😎 Подробней про импорты здесь: https://docs.python.org/3/tutorial/modules.html #2to3#pep#basic

Резултати

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

Пребарај: #usenergystrategy

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

@rednile12 · Post #10450 · 22.12.2025 г., 19:24

🔺Continuation from above @rednile12 ⚔️ Turkey: Strategic Catalyst While Greek officials publicly deny targeting Turkey, the logic is clear: ▪️Turkish Blue Homeland doctrine ▪️Naval assertiveness near Cyprus and drilling disputes ▪️40,000–60,000 troops in northern Cyprus ▪️Expansion in Syria The Xenophon concept is deterrence by coordination, raising the cost of Turkish escalation while avoiding overt provocation. Turkish responses online and politically reveal strategic irritation rather than indifference. 🛢️ EastMed & the U.S. Energy Play The security and energy dimensions are inseparable. EastMed — signed in Athens in January 2020 — was designed to link Israeli and Cypriot gas directly to Greece and onward to Europe, bypassing unstable intermediaries and reducing Europe’s exposure to Russian energy coercion. Consider the broader context: 🔹Nord Stream sabotage and closure of the Ukrainian transit corridor left Russia’s gas flowing via TurkStream, allowing Ankara to profit while Europe remained dependent. 🔹 U.S. President Trump explicitly pushed the EU to stop importing Russian gas while sabotaging Nord Stream, aiming to reroute Europe toward alternative suppliers. 🔹Analysts note the difference between Biden and Trump is one of style, not strategic logic — both administrations favored managing intermediaries over creating truly sovereign connectivity. 🔹 Other attempts, like IMEC linking India, the Gulf, and Europe, reveal the limits of Washington’s approach: symbolic agreements without Mediterranean anchors cannot secure reliable energy corridors, leaving Turkish leverage intact. 🇪🇬 Egypt: Bridge and Buffer Israel’s growing gas cooperation with Egypt complements EastMed rather than undermining it: ▪️ Egypt provides an immediate, pragmatic export route via existing LNG terminals ▪️ EastMed remains the long-term, direct corridor to Europe Together, they offer flexibility without reducing sovereignty. But Egypt’s role is also constrained: it is increasingly a logistics node in an Israel-centric Mediterranean security and energy order, limiting its diplomatic maneuvering, especially regarding Gaza. 🇵🇸 Palestine: Sidelined Palestine remains absent from regional security and energy calculus. Gaza is treated as a permanent security zone, not a political partner, while Israel embeds itself into Mediterranean and European security networks. Arab leverage erodes, and Palestine is reduced from a regional cause to a managed file. 🔻 Strategic Takeaways 🔹Xenophon Force: Multinational rapid response, signaling pro-Western deterrence, complicating Turkish ambitions. 🔹Energy Security: EastMed + Egypt LNG = sovereign flexibility for Europe, bypassing unstable intermediaries. 🔹U.S. Influence: Preference for managing intermediaries (Turkey, Ukraine, Central Asia) over eliminating dependency, risking strategic incoherence. 🔹Regional Impacts: Egypt partially integrated, Palestine structurally marginalized, Turkey forced to recalibrate. This is not peace architecture. It is conflict management for the strong — and structural invisibility for the weak. 🔴Follow @rednile12 for critical geopolitical analysis #RedNile_Geopolitics #EasternMediterranean#XenophonForce#IsraelGreeceCyprus#Turkey#Egypt#Palestine#EastMedPipeline#EnergyGeopolitics#BlueHomeland#NordStream#USEnergyStrategy#MediterraneanSecurity#RedNileMedia