Вторая по частоте 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
Lassa fever (LF) initially presents like other common illnesses accompanied by a fever, such as malaria.
Healthcare workers are urged to remain vigilant.
Consider a #LF diagnosis when seeing patients showing symptoms of fever.
🔗Health Advisory
https://www.ncdc.gov.ng/news/507/lassa-fever-public-health-advisory
📜
Annual outbreaks of #LassaFever involve the infection and death of a loved family member, a spouse, a parent, and often seasoned healthcare workers and team members.
Our #LF health advisory provides measures through which health workers and the public can protect themselves.
🔗Read via https://www.ncdc.gov.ng/news/507/lassa-fever-public-health-advisory
📣JOIN IN
Our #LassaFever Research Colloquium is LIVE!
The colloquium aims to review the current situation and identify research priorities that will bring about a better understanding of #LF transmission using a One Health approach
🗓️TODAY, May 2nd, 2023
🕗 9:00 a.m. WAT
Register to join:
https://us06web.zoom.us/webinar/register/WN_N0qf8u_IR0W_8k1UaiCnaA
Healthcare workers should raise suspicion for patients with a history of contact with
➡️a probable/confirmed case of #LassaFever within 21 days of onset of fever
➡️body fluids/tissues of a patient with a febrile illness, symptoms & signs suggestive of #LF
🔗Read and share
https://www.ncdc.gov.ng/themes/common/docs/protocols/92_1547068532.pdf
Healthcare workers are advised to always be vigilant - lookout for symptoms of #LassaFever, not all fevers are malaria.
Any febrile illness that has not responded to the use of anti-malaria or antibiotics after 48 hrs should raise an index of suspicion for #LF.
#LassaFeverInfo