@kayleighmcenany · Post #2721 · 23.06.2025 г., 14:35
#MIGA @KayleighMcEnany
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
Пребарај: #miga
@kayleighmcenany · Post #2721 · 23.06.2025 г., 14:35
#MIGA @KayleighMcEnany
Hashtags
@kayleighmcenany · Post #2720 · 23.06.2025 г., 14:22
White House: If the Iranian regime refuses to come to a peaceful, diplomatic solution — which the President is still interested in engaging in ... why shouldn't the Iranian people take away the power of this incredibly violent regime? #MIGA @KayleighMcEnany
Hashtags
@kayleighmcenany · Post #2716 · 23.06.2025 г., 04:58
#MIGA @KayleighMcEnany
Hashtags
@kayleighmcenany · Post #2714 · 22.06.2025 г., 23:33
#MIGA @KayleighMcEnany
Hashtags
@kayleighmcenany · Post #2713 · 22.06.2025 г., 23:30
#MIGA @KayleighMcEnany
Hashtags
@kayleighmcenany · Post #2711 · 22.06.2025 г., 22:33
#MIGA @KayleighMcEnany
Hashtags
@kayleighmcenany · Post #2710 · 22.06.2025 г., 22:23
#MIGA @KayleighMcEnany
Hashtags
@kayleighmcenany · Post #2709 · 22.06.2025 г., 22:20
#MIGA @KayleighMcEnany
Hashtags
@kayleighmcenany · Post #2708 · 22.06.2025 г., 22:19
#MIGA @KayleighMcEnany
Hashtags
@kayleighmcenany · Post #2729 · 24.06.2025 г., 10:02
From an Iranian to the USA and Israel: The Islamic Republic ain’t gonna make peace—remember that. Araghchi is the regime’s lapdog, and there’s no difference between reformists and hardliners. It was the reformists that imposed the hijab in the beginning of the revolution, it was the reformist government who killed more than 5000 people in just 3 days during "Aban 98" protest. Did you see how, right after the peace announcement, they struck again—and so far six people in Beer Sheba have lost their lives? And launched another missiles after ceasefire? While they are denying these officially they are celebrating about it online and in their circles. This regime is wounded and insane; it’s handing out mass death sentences to people in Iran under the name of “espionage,” and it’s even threatening us abroad that “soon we’ll be wiped out.” Their soilders and loyalists are now in the streets of Tehran and big cities going through people's phone to arrest people who have any messages, pictures and videos in support of Trump, USA and Israel or anti regime. How do you expect to make peace with this regime?! They only understand the language of force; they’ve never played by the rules of humanity, negotiation, or law. Those still talking about dialogue are either in on the power themselves or are fooling themselves. We’re not up against a normal system—we’re facing a mafia that treats people’s lives as worthless. Peace only makes sense when both sides choose life, not when one side is solely after suppression, power, and the physical elimination of its opponents. The Islamic Republic is seeking neither peace with its own people nor with the world. The only thing it understands is resistance and cost. Real peace can only be made with the people of Iran, not with a regime that has declared war on its own people for years. Please share this message and be our vioce. #Trump#Israel#USA#Iran#War#MAGA#MIGA#Peace#Regime @KayleighMcEnany