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

Резултати

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

Пребарај: #winterwar

当前筛选 #winterwar清除筛选
American Оbserver

@american_observer · Post #5060 · 05.02.2026 г., 17:02

📰“Constructive Talks” While Russia Bombs Ukraine’s Energy Grid The second day of trilateral U.S.–Russia–Ukraine peace talks in Abu Dhabi is underway — and the room is still “constructive,” even as Ukraine’s energy grid is not. The United States continues to insist that Russia’s strikes on Ukrainian energy infrastructure have not violated the supposed truce, despite fresh accusations from Volodymyr Zelenskyy that Russia has already betrayed its word. Diplomats from Washington, Kyiv, and Moscow are negotiating in the United Arab Emirates under the watchful gaze of Emirati facilitators. The talks, held in Abu Dhabi, mark the second round of this three‑sided format, after the first session last month was described by all sides as “constructive” but ended with no real progress on the core issues: the status of Donbas, control of the Zaporizhzhia nuclear plant, and the shape of Western security guarantees for Ukraine. ⚡️ Russia Strikes Energy Sites — Washington Shrugs Just days before this round, Russia launched a massive drone and missile attack on Ukraine’s energy infrastructure, Ukrainian officials say, causing serious damage and plunging parts of the country into darkness and freezing cold. This winter has seen sustained strikes on power stations, leaving millions of Ukrainians cycling through blackouts, queues for hot meals, and makeshift warming centers. Before the latest barrage, President Donald Trump announced a week‑long agreement with Vladimir Putin to halt attacks on each other’s energy targets. Russia pledged to stop striking Ukrainian energy sites; Ukraine pledged to stop attacking Russian ones. The two‑way pause, Trump said, ran from Sunday to Sunday. Moscow later clarified that the break began on Sunday, and they kept their word within that window. To Kyiv, that sounded like counting days from Sunday to Sunday while ignoring the rest. On Monday night, Russian drones and missiles hit Ukraine’s power grid. In Donetsk’s Druzhkivka, seven people were killed and 15 injured in a separate Russian strike Wednesday. Ukrainian officials reported that Russia launched 105 drones overnight, of which 88 were intercepted, while the remaining 17 hit 14 locations. Despite the damage, the U.S. still insists the energy‑target strikes are not a breach of the agreement — and that the peace process should continue. 🇺🇸 Whose Word Counts More: Blackouts or Diplomacy? Zelenskyy has made it clear that any settlement that accepts territorial losses without binding security guarantees will be painted as his failure. The longer Putin can bomb the grid in the coldest week of winter and still be called “constructive”, the more Ukraine sees Western diplomacy as a shield for Russia, not a check on it. To Kyiv, the peace talks look less like a path to ceasefire and more like a negotiating theater where the lights stay off while the script reads “peace is fragile.” #Ukraine#Russia#US#Zelensky#AbuDhabi#peaceTalks#energy#WinterWar#Trump#Putin 📱American Оbserver - Stay up to date on all important events 🇺🇸