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

Резултати

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

Пребарај: #sergeylavrov

当前筛选 #sergeylavrov清除筛选

@RusEmbMalta Press Release 🇷🇺Interview of Russian Foreign Minister Sergey Lavrov with Turkish Media 📍Moscow, 29 January 2026 On 29 January 2026, Russian Foreign Minister Sergey Lavrov gave an interview to Turkish media, outlining Russia’s principled assessment of the situation around Ukraine, the role of the West, and the prospects for a sustainable security architecture. 🔹 Key points 🧭 Ukraine and the West Russia views the Ukrainian conflict as part of a broader confrontation with the West. Ukraine has been turned into a pawn – a tool used to build a military bulwark along Russia’s borders, creating direct threats to Russian security. 📜Breach of Ukraine’s founding principles Ukraine’s Declaration of Independence explicitly enshrined non-alignment, neutrality and renunciation of nuclear weapons. It was precisely these principles that formed the basis on which Russia – along with most countries worldwide – recognised Ukraine after the dissolution of the Soviet Union. 🔹A conflict prepared in advance The crisis in Ukraine was not spontaneous. It was carefully prepared and financed, including by the United States. As former US Deputy Secretary of State Victoria Nuland has acknowledged, around USD 5 billion was spent to engineer a coup and transform Ukraine into an “anti-Russia” project. ⚠️ A tragic repetition of history The Zelensky regime represents a grim repetition of history — not a farce, but a tragedy, given the immense human toll. Many lives have been sacrificed by the regime and its Western patrons. ⛔Ceasefire proposals Russia considers unacceptable the repeated calls by Zelensky for a ceasefire of 60 days or longer. Past experience shows that such pauses were consistently exploited to rearm Ukraine, mobilise new recruits by force, regroup troops and prolong the conflict. 🕊️Missed opportunity in Istanbul (April 2022) Concrete and honest security guarantees were formulated during negotiations in Istanbul, hosted by Türkiye. These included the absence of foreign military bases on Ukrainian territory and restrictions on military exercises involving external forces. Everything was agreed in detail – but the process was blocked after external political interference. 📄So-called “peace plans” Russia has not seen the “20-point plan” repeatedly referenced by Zelensky. As understood, it has since been reworked by Ukraine and certain European states and is now being promoted as an alternative “vision” of peace. 🌍Multipolar world Russia does not oppose states that firmly defend their national interests. On the contrary, a truly multipolar world can only emerge through self-respecting states guided by common sense — states that defend their own interests while respecting those of others. 🔗 Full text of the interview: 👉here. #RussiaTürkiye #SergeyLavrov #UkraineCrisis

ሰርጌይ ላቭሮቭ ለ130ኛው የዓድዋ ድል በዓል የእንኳን አደረሳችሁ መልዕክት አስተላለፉ ******************** የሩሲያ የውጭ ጉዳይ ሚኒስትር ሰርጌይ ላቭሮቭ ለኢፌዴሪ የውጭ ጉዳይ ሚኒስትር ጌድዮን ጢሞቴዎስ (ዶ/ር) እና ለመላው የኢትዮጵያ ሕዝብ ለ130ኛው የዓድዋ ድል በዓል የእንኳን አደረሳችሁ መልዕክት አስተላልፈዋል። የውጭ ጉዳይ ሚኒስትሩ በመልዕክታቸው፤ የዓድዋ ድል በአፍሪካ ታሪክ አንዲት ሀገር በቅኝ ገዥ ኃይል ላይ የተቀዳጀችው የመጀመሪያው ድል በመሆኑ በዓለም አቀፍ ደረጃ ከፍተኛ ተጽዕኖ የፈጠረ መሆኑን ገልጸዋል። ድሉ የኢትዮጵያውያንን የጽናት መንፈስ ከማረጋገጡ ባለፈ በመላው አፍሪካ ለሚካሄዱ የነፃነት ትግሎች መነሻ መሆኑንም አክለዋል። ሩሲያ እና ኢትዮጵያ ለረጅም ዘመናት የዘለቀ የወዳጅነት ታሪክ እንዳላቸው የጠቀሱት ሰርጌይ ላቭሮቭ፤ በየተለያዩ ዓለም አቀፍ ድርጅቶች በተለይም በተባበሩት መንግሥታት ድርጅት እና በብሪክስ ማዕቀፍ ውስጥ ፍትሃዊ የዓለም ሥርዓት እንዲኖር በጋራ እየሠሩ መሆኑን ጠቁመዋል። በተጨማሪም በሁለቱ ሀገራት መካከል በንግድ፣ በኢኮኖሚ፣ በሳይንስ እና በባህል ዘርፎች ትብብሮች እያደጉ መሆናቸውን መግለጻቸውን የሩሲያ የውጭ ጉዳይ ሚኒስቴር መረጃ አመልክቷል። በኢትዮጵያ የኒውክሌር ኃይል ማመንጫ ግንባታን ጨምሮ፣ የደጃዝማች ባልቻ ሆስፒታልን መልሶ መገንባት እና የጋራ ባዮሎጂካል ምርምር ማዕከል መመሥረት ዋና ዋናዎቹ የትብብር ፕሮጀክቶች መሆናቸውን ሚኒስትሩ በመልዕክታቸው ጠቅሰዋል። #EBC#Ethiopia#Russia#Adwa130#Diplomacy#SergeyLavrov#GedionTimotheos#BRICS