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

Пребарај: #aid

当前筛选 #aid清除筛选
Red Nile

@rednile12 · Post #11264 · 15.03.2026 г., 14:09

🇵🇸Newly released footage shared by a British recruit who served at aid distribution sites run by the #Gaza Humanitarian Foundation exposes the aid system designed by Israel in cooperation with the United States to humiliate Palestinians. Nearly 2,000 Palestinians were killed at the foundation’s distribution points in incidents that included shooting “for fun,” according to the recruit. @EuroMedHR #Genocide#Aid#GHF#Starvation#Famine#US#Palestine

MessageInABottle

@mib_messageinabottle · Post #6796 · 16.05.2024 г., 14:15

ZioNazi*** #Israeli"settlers"evil colonists are allowed by the #ZioNazi Israeli Government to destroy desperately needed humanitarian #aid coming from #Jordan to #Gaza. These sicko “civilians” are destroying vital food aid to a #starving population, which is literally facing famine conditions which have been created by the actions of those very same #ZioNazis, and all while literally laughing about it and obviously having fun. Getting the settlers to destroy the aid is a very evil and dishonest way for the #Zionist Israeli Government to deny aid to #Gaza while pretending to the International community that they are doing all they can to allow it in. --------- *** Anyone wondering why I usually refer to Zionists as "ZioNazis" ...... ........ well, now you know why!