@russianhead · Post #20923 · 27.02.2025 г., 13:58
Footage of a powerful attack on targets in Kiev. #denazification
Hashtags
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
Пребарај: #denazification
@russianhead · Post #20923 · 27.02.2025 г., 13:58
Footage of a powerful attack on targets in Kiev. #denazification
Hashtags
@rusembsg · Post #3841 · 03.02.2025 г., 01:16
Embassy Comment We have noted the article by Jonathan Eyal “#EU renewed toothless #sanctions against #Russia”, published in The Straits Times on February 1, 2025. We agree with the author that the unilateral illegitimate sanctions aimed at continuing the hybrid war against Russia and inflicting a strategic defeat on us, are both unsuccessful and futile. There is no doubt that the objectives of the special military operation (#SMO) on the #denazification and demilitarization of #Ukraine, its neutral and non-nuclear status, as well as ensuring the interests of the Russian people will be achieved. The “bankrupt” Euro-Atlantic security architecture (#NATO) is being replaced by a new equal and indivisible #EurasianSecurity, which includes all the organizations that have demonstrated their effectiveness – the #EAEU, #SCO, #CSTO, etc. The concept of #Eurasian security aligns with the accelerating formation of a multipolar world order. A key pillar of this shift is the rapidly growing, non-Western center of influence represented by #BRICS, which continues to attract countries from the #GlobalSouth, including #ASEAN member states, paving the way for a BRICS-ASEAN dialogue. The consolidation of the countries of the Global South, making a choice in favor of peaceful, sustainable, inclusive, independent development together with Russia, China and other countries, represents a stable and viable trend in contrast to the outdated Western neocolonial “#InSanctionsWeTrust” mentality.