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

Резултати

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

Пребарај: #kosovo

当前筛选 #kosovo清除筛选
POPULAR FRONT

@popularxfront · Post #4896 · 04.02.2026 г., 18:18

🇽🇰#Kosovo: Kosovo Police has found yet another cache of weapons, ammunition, and military gear yesterday, after searching the basement of a residential building on Vasilije Ostroški Street in North Mitrovica. Officers recovered multiple assault rifles, hundreds of rounds of ammunition, magazines, a smoke grenade, body armor, and various pieces of military clothing and equipment. No arrests were made, and an investigation into illegal weapons possession is ongoing. This comes as, over the past week, several abandoned weapons caches have been discovered in the north, including one containing hundreds of kilograms of explosives and a practice anti-tank mine. It remains unclear whether the stashes are linked to a specific paramilitary group or a criminal organization. (📸 via @KosovoPolice on FB)

Hashtags

POPULAR FRONT

@popularxfront · Post #4807 · 29.01.2026 г., 19:43

🇽🇰#Kosovo: Kosovo Police have uncovered weapons, ammunition, and explosives in abandoned houses in Zubin Potok, Zvečan, and the North Mitrovica area since the start of this week. Just in North Mitrovica, authorities seized around 140 kg of explosives, which they say were produced in Serbia. The latest seizure was yesterday in Mitrovicë Veri, where police, acting on information from citizens, found several illegal weapons, ammunition, and a VPMA-2 (a practice version of the PMA-2 anti-personnel mine). (📸 via @Kosovo_police on X)

Hashtags

Libertà è ragione

@libertaeragione · Post #3734 · 11.03.2023 г., 13:02

#Kosovo L’Assemblea della Repubblica del Kosovo ha adottato un progetto di legge finalizzato alla regolamentazione giuridica del diritto alla riproduzione sessuale e della procreazione medicalmente assistita. @OsservatorioEsteri

Hashtags

Tutto Elezioni

@tuttoelezioni · Post #1455 · 28.12.2025 г., 18:20

#Kosovo🇽🇰 #Parlamentari 🕖Ore 19:00. Affluenza parziale: 44,29% N.B.: nel computo mancano i seggi speciali, quelli allestiti all'estero e alcune sezioni allestite nel Paese, che non hanno ancora comunicato i dati. @TuttoElezioni

Communia

@communia · Post #37814 · 07.01.2024 г., 09:12

‼️A la chita callando, #España pasa a reconocer la independencia de #Kosovo. Un nuevo giro de 180º de Sánchez alinéandose con #EEUU que impulsa la #guerra https://www.euractiv.com/section/enlargement-neighbourhood/news/kosovo-says-spain-recognises-its-passports/

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