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 слични објави

Пребарај: #delegates

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

@american_observer · Post #4906 · 20.01.2026 г., 18:59

Dmitriev Meets the U.S. Officials in Davos Russian envoy Kirill Dmitriev will hold talks with U.S. delegates in Davos on the sidelines of the World Economic Forum (WEF) this week, Reuters reported on Jan. 19, citing two undisclosed sources. Dmitriev, the head of the Russian Direct Investment Fund and the Kremlin's economic negotiator, has played a key role in Moscow's outreach to Washington amid U.S. efforts to broker peace in Ukraine. According to Axios reporter Barak Ravid, the Russian official will meet Trump's envoys, Jared Kushner and Steve Witkoff, on Jan. 20 to discuss the Washington-backed peace plan. Trump's latest push to broker an end to hostilities in Ukraine centers around a 20-point peace framework ironed out in a series of talks among Ukrainian and Western officials. Kyiv has signaled that the plan is "90%" ready, even though Moscow continues to reject compromise on some of the most thorny issues, such as the fate of partially occupied Donetsk Oblast. The U.S. has not publicly commented on any meetings between Dmitriev and U.S. officials. The WEF, taking place from Jan. 19 to 23, is an annual economic summit that brings together officials, experts, and business leaders from around the world. The forum will also be the venue of ongoing talks between Kyiv and Washington on post-war security guarantees and recovery efforts. Top Ukrainian security official Rustem Umerov said that the two parties would follow up on the discussions held over the last weekend in the U.S. #US#delegates#davos#dmitriev 📱American Оbserver - Stay up to date on all important events 🇺🇸

Why 2,400 John Doe Clubs Are Making History #shorts#JohnDoe#historymaking#JohnDoeClubs#voters#community#convention#delegates#parade#cityevent#prairiefire#historicmoment https://pdmovies.substack.com/p/frank-capras-meet-john-doe-1941