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

Резултати

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

Пребарај: #msf

当前筛选 #msf清除筛选
Borkena

@borkena · Post #5560 · 15.12.2025 г., 16:34

Ethiopia’s First R21 Malaria Vaccine Rollout, A Global First In A Refugee Camp (MSF) https://borkena.com/2025/12/15/ethiopias-first-r21-malaria-vaccine-rollout-a-global-first-in-a-refugee-camp/#Ethiopia#Malaria#MSF

Addis Standard

@addisstandardeng · Post #21208 · 27.01.2026 г., 13:35

#Afar: Delivering lifesaving nutrition across one of #Ethiopia’s harshest landscapes Once you leave the city of #Semera behind, the Ethiopian landscape quickly opens into vast stretches of dry earth that seem to run endlessly toward the horizon. Sparse green bushes dot the dusty ground, framed by distant mountains and volcanoes that define the Afari landscape. As our vehicles drive toward the town of Magenta to deliver nutrition to children through Doctors Without Borders/Médecins Sans Frontières (#MSF) outreach activities, a river runs alongside the road. One of the main challenges faced by local communities is right in front of our eyes: water. Afar, crossed by the Danakil Depression marking the northern end of the East African Rift Valley, is considered one of the hottest inhabited places on Earth. Water availability and quality in the region are strongly influenced by its..... https://www.facebook.com/AddisstandardEng/posts/pfbid02eyGnawFb7VhMHg63k8WpiMijY9FpwCawUmrdsKrtzRv4KyRYPzEBTN3ngQUxCZpEl

Addis Standard

@addisstandardeng · Post #21899 · 01.04.2026 г., 05:28

Sexual violence is being used as a weapon in #Sudan’s war, doctors group says #Sexual_violence against women and girls is being used as a weapon of war in Sudan ‘s fierce conflict between the military and paramilitary Rapid Support Forces (#RSF), international aid group Doctors Without Borders said in a report Tuesday. Sudan slid into chaos in April 2023 when a power struggle between the two forces exploded into open fighting in Khartoum and elsewhere. The International Criminal Court is investigating mass killings, gang rapes and other crimes during the conflict as potential war crimes and crimes against humanity. Doctors Without Borders, known by its French acronym #MSF, detailed in its report the accounts of women who were gang raped in the South #Darfur and North Darfur regions. MSF said that at least 3,396 survivors of sexual violence sought treatment at their facilities between January 2024...... https://apnews.com/article/sudan-war-darfur-sexual-violence-rape-rsf-bead0dded97628032066141e063e41e5