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

Резултати

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

Пребарај: #unga79

当前筛选 #unga79清除筛选
Embassy of Russia in Singapore

@rusembsg · Post #3539 · 01.10.2024 г., 04:16

🗓 On September 27, Russia's Foreign Minister Sergey Lavrov had a meeting with High Representatives of the Pacific Small Island Developing States on the sidelines of the 79th Session of the UN General Assembly in New York. The discussion centred on current international issues, including the situation in the Asia-Pacific region and globally. 🤝 The Officials confirmed their intention to step up cooperation on a broad range of issues of mutual interest. #UNGA79

Hashtags

🗓 On September 25, Foreign Minister Sergey Lavrov had a brief meeting with OSCE Chairperson-in-Office, Deputy Prime Minister and Minister for Foreign Affairs of Malta, Ian Borg, on the sidelines of the 79th session of the UN General Assembly, at the latter’s initiative. The counterparts discussed topical issues on the organisation’s agenda. The Russian side stressed the importance of the OSCE’s work in the interests of all member states, rather than individual groups of countries. Ways to overcome the crisis in the OSCE and normalise its activities were outlined, including in light of the upcoming OSCE Ministerial Council Meeting to take place in Valletta on December 5 and 6. During the meeting, Sergey Lavrov and Ian Borg also touched upon some aspects of Russia-Malta relations. #UNGA79

Hashtags

Embassy of Russia in Singapore

@rusembsg · Post #3525 · 27.09.2024 г., 02:39

🌐 On September 26, Foreign Minister Sergey Lavrov took part in a traditional #BRICS Ministerial meeting held on the sidelines of the 79th session of the UN General Assembly in New York. The Ministers had an in-depth exchange of views on a broad range of international issues, including items on the agenda of the 79th UN General Assembly session. Discussions focused on peace and security, global economic stability, and sustainable development. The participants reiterated their commitment to enhancing coordination within BRICS on international platforms. As part of preparations for the upcoming BRICS Summit in Kazan on October 22-24, the ministers reviewed pressing BRICS cooperation-related issues, including the establishment of a partner country category. The Brazilian delegation provided an outline of its BRICS chairmanship in 2025. #UNGA79

EmbajadaRusaVen

@embajadarusaven · Post #1874 · 25.09.2024 г., 20:56

En el marco del 79° periodo de sesiones de #UNGA79 comenzó la reunión entre el Canciller 🇷🇺 Serguei Lavrov y su homólogo 🇻🇪 Yvan Gil Embajador Sergey Mélik-Bagdasárov: Las negociaciones entre Rusia y Venezuela en el marco de la #UNGA79 transcurren en la tradicional atmósfera de amistad y respeto mutuo. ¡Las cálidas sonrisas de los Cancilleres Serguéi Lavrov e Yván Gil son prueba de ello! 😊 Una vez más, reforzamos los fuertes lazos que unen a nuestros pueblos. #AlianzaEstrategicaEnAccion

Russian Embassy in Asmara

@rusembasmara · Post #501 · 27.09.2024 г., 04:13

🌐 On September 26, Foreign Minister Sergey Lavrovtook part in a traditional #BRICS Ministerial meeting held on the sidelines of the 79th session of the UN General Assembly in New York. The Ministers had an in-depth exchange of views on a broad range of international issues, including items on the agenda of the 79th UN General Assembly session. Discussions focused on peace and security, global economic stability, and sustainable development. The participants reiterated their commitment to enhancing coordination within BRICS on international platforms. As part of preparations for the upcoming BRICS Summit in Kazan on October 22-24, the ministers reviewed pressing BRICS cooperation-related issues, including the establishment of a partner country category. The Brazilian delegation provided an outline of its BRICS chairmanship in 2025. #UNGA79

Russian Embassy in Asmara

@rusembasmara · Post #499 · 26.09.2024 г., 18:45

🗓 On September 26, Russia's Foreign Minister Sergey Lavrovtook part in a working meeting of the #CSTO Foreign Ministers organised by Kazakhstan’s CSTO chairmanship on the sidelines of the high-level week of the 79th Session of the UN General Assembly. 🤝 The Ministers discussed a wide range of international and regional security issues. They stressed the need to step up coordination of actions on topical issues on the UN’s agenda between the CSTO member states on the UN platform and further promote cooperation between the CSTO and the UN. The Ministers discussed preparations for the next session of the CSTO Collective Security Council on November 28 in Astana. #UNGA79

Hashtags

ПретходнаСтраница 1 од 3Следна