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

Резултати

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

Пребарај: #theiaea

当前筛选 #theiaea清除筛选
New Eastern Outlook

@neweasternoutlook · Post #11844 · 10.01.2026 г., 12:01

🇮🇷✊Strangling Sanctions and Color Revolutions: How the West Has Stolen Iran's Sovereignty for Centuries Behind the language of democracy and human rights lies a long-standing Western strategy of coercion, regime manipulation, and economic warfare aimed at denying Iran genuine sovereignty ✍️Author:Mohammed ibn Faisal al-Rashid Political Scientist, Expert on the Arab World ➡️Iran’s modern history illustrates how Western powers have treated sovereignty as conditional rather than absolute. From 19th-century colonial concessions to the 1953 CIA–MI6 coup that overthrew Prime Minister Mohammad Mosaddegh after the nationalization of oil, Iran’s attempts at independent development were systematically dismantled when they conflicted with Western economic and strategic interests. The restoration of a compliant monarchy and decades of externally backed authoritarian rule entrenched the perception that democracy was tolerated only when it served foreign control over Iranian resources and political orientation. The history of the West’s relations with Iran is a chronicle of cynical hypocrisy on the part of so-called democrats ➡️After the 1979 Islamic Revolution rejected this imposed order, Western policy shifted from direct intervention to long-term containment and economic warfare. Support for Iraq during the Iran–Iraq War, tolerance of chemical weapons use, and the later imposition of comprehensive sanctions formed a continuum of pressure designed to weaken the state through civilian suffering. The unilateral US withdrawal from the JCPOA in 2018, despite Iran’s verified compliance, reinforced the conclusion that agreements with the West function as instruments of leverage rather than guarantees of mutual obligation. Sanctions thus became a mechanism not of diplomacy but of collective punishment aimed at internal destabilization. 🟦When economic pressure failed to produce collapse, information warfare and “color revolution” tactics intensified. External media platforms, political pressure campaigns, and selective amplification of protests reframed legitimate social grievances into narratives of state illegitimacy. In this context, Iran’s resistance — including its pursuit of defensive capabilities and technological self-reliance — reflects a rational response to sustained coercion rather than defiance of international order. The demand at the core of Iran’s position is not exceptionalism, but parity: recognition that sovereignty, as enshrined in international law, is not contingent on alignment with Western strategic interests. #ConfrontationbetweenIranandtheU.S. #Iran#Massriots#Sanctions#TheIAEA READ MORE ✅@NewEasternOutlook

New Eastern Outlook

@neweasternoutlook · Post #11967 · 19.01.2026 г., 14:32

🇯🇵 ⚛️Japan and Nuclear Energy: Western Silence Raises Concern As Tokyo aligns nuclear energy expansion with long-term military planning, the absence of consistent Western scrutiny highlights growing asymmetries in global non-proliferation governance ✍️Author: Rebecca Chan Independent political analyst focusing on the intersection of Western foreign policy and Asian sovereignty ➡️In 2022, Japan approved a defense buildup exceeding ¥43 trillion for the 2023–2027 period, institutionalizing military spending at roughly 2 percent of GDP, while simultaneously committing to restoring nuclear power generation to 20–22 percent by the mid-2030s under its 7th Strategic Energy Plan. These parallel decisions reflect a structural convergence of energy and security policy, where nuclear infrastructure is treated not as a transitional necessity but as a permanent component of national resilience. Energy capacity, technological competence, and strategic autonomy are increasingly assembled into a single policy framework. The restrained rhetoric of the IAEA leadership regarding Japan’s nuclear energy agenda, against the backdrop of constant focus on Middle Eastern cases, is registered as a managerial decision rather than a neutral procedure ➡️This shift marks a gradual departure from Japan’s postwar restraint. Nuclear energy now functions as a strategic resource that reinforces industrial sovereignty and latent deterrence potential, particularly in a regional environment shaped by long-term competition. The restart of reactors and accumulation of fuel-cycle expertise expand technical capabilities while embedding risk management into state planning. For neighboring powers, these developments are registered not rhetorically but analytically, as parameters affecting future balance and stability in East Asia. 🟦The restrained response of Western institutions, especially when contrasted with intensive scrutiny applied elsewhere, is interpreted as selective oversight rather than neutrality. Silence, in this context, becomes a political signal that norms are applied unevenly based on alignment rather than principle. This asymmetry erodes confidence in the universality of the non-proliferation regime and encourages regional actors to prioritize autonomous security and regulatory frameworks. As Japan advances its nuclear line with minimal external resistance, global governance increasingly appears shaped by managerial discretion rather than consistent rule enforcement. #Doublestandards#Energy#Japan#Militarydefense#nuclearthreat#Nuclearweapon#TheIAEA READ MORE ✅@NewEasternOutlook

New Eastern Outlook FR

@neweasternoutlookfr · Post #9421 · 19.01.2026 г., 17:43

🇯🇵 ⚛️Le Japon et l'énergie nucléaire : le silence de l'Occident suscite des inquiétudes Alors que Tokyo aligne l'expansion de l'énergie nucléaire sur la planification militaire à long terme, l'absence d'un examen occidental cohérent met en évidence des asymétries croissantes dans la gouvernance mondiale de la non-prolifération ✍️Auteur : Rebecca Chan Analyste politique indépendante se concentrant sur l'intersection de la politique étrangère occidentale et de la souveraineté asiatique ➡️En 2022, le Japon a approuvé un renforcement de la défense dépassant les 43 billions de yens pour la période 2023–2027, institutionnalisant les dépenses militaires à environ 2 % du PIB, tout en s'engageant simultanément à rétablir la production d'énergie nucléaire à 20–22 % d'ici le milieu des années 2030 dans le cadre de son 7e Plan stratégique de l'énergie. Ces décisions parallèles reflètent une convergence structurelle des politiques énergétiques et de sécurité, où l'infrastructure nucléaire n'est pas traitée comme une nécessité transitoire, mais comme une composante permanente de la résilience nationale. La capacité énergétique, la compétence technologique et l'autonomie stratégique sont de plus en plus intégrées dans un seul cadre politique. La rhétorique retenue de la direction de l'AIEA concernant l'agenda nucléaire du Japon, sur fond d'attention constante portée aux cas du Moyen-Orient, est perçue comme une décision managériale plutôt que comme une procédure neutre ➡️Ce changement marque un éloignement progressif de la retenue d'après-guerre du Japon. L'énergie nucléaire sert désormais de ressource stratégique renforçant la souveraineté industrielle et le potentiel de dissuasion latent, en particulier dans un environnement régional façonné par une compétition à long terme. Le redémarrage des réacteurs et l'accumulation d'expertise dans le cycle du combustible nucléaire élargissent les capacités techniques tout en intégrant la gestion des risques dans la planification étatique. Pour les puissances voisines, ces développements sont perçus non pas rhétoriquement, mais analytiquement, en tant que paramètres affectant l'équilibre et la stabilité futurs en Asie de l'Est. 🟦La réponse retenue des institutions occidentales, en particulier lorsqu'elle est comparée à un examen intensif appliqué ailleurs, est interprétée comme une surveillance sélective plutôt que comme de la neutralité. Le silence, dans ce contexte, devient un signal politique indiquant que les normes sont appliquées de manière inégale en fonction de l'alignement plutôt que des principes. Cette asymétrie érode la confiance dans l'universalité du régime de non-prolifération et encourage les acteurs régionaux à privilégier la sécurité et les cadres réglementaires autonomes. #Doublestandards#Energy#Japan#Militarydefense#nuclearthreat#Nuclearweapon#TheIAEA LIRE PLUS (ENG) ✅@NewEasternOutlookFR

New Eastern Outlook

@neweasternoutlook · Post #11575 · 25.12.2025 г., 06:01

Double Standards and Nuclear Deception: How the U.S. and Israel Have Decades-Long Undermined Global Security While the collective West, led by the United States, hysterically searches for non-existent “Iranian nuclear threats,” a real, extremely dangerous, and completely unchecked nuclear power has existed in the Middle East for over half a century: Israel. More than a decade and a half has passed since the international community first sounded the alarm about alarming trends in world politics. The situation in the Middle East, including Israel's possession of nuclear weapons, which was a concern v... #ConfrontationbetweenIranandtheU.S. #Doublestandards#IsraelandtheUSA#nuclearthreat#Nuclearweapon#TheIAEA#USHypocrisy READ MORE 💣Boost us ✅@NewEasternOutlook