Вторая по частоте 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
⚡️Tether kompaniyasi Neuralink chiplariga o‘xshash texnologiya ustida ishlamoqda
⚡️ Tether kompaniyasi BrainOS deb nomlangan tizimni ishlab chiqayotganini e’lon qildi. Bu tizim inson aqlini sun’iy intellektning hisoblash imkoniyatlari bilan birlashtirishi mumkin.
⚡️ Kompaniyaning bashoratiga ko‘ra, yaqin 5–10 yil ichida sun’iy intellekt ko‘plab kasblarning ajralmas qismiga aylanadi va odamlar bunga moslashishga majbur bo‘ladi.
⚡️BrainOS bu muammoni hal qilish uchun taklif etilgan — texnologiyalarni to‘g‘ridan-to‘g‘ri inson miyasi bilan integratsiya qilish. Bu orqali fikrlash jarayoni tezlashadi va insoniyat sun’iy intellekt davrida yetakchilikni saqlab qolishi mumkin.
👉Bizning barcha loyihalar | #tether
CEO of #Tether warns about the possibility of mass mailing of phishing emails with the distribution of crypts
Hackers have hacked a "well-known" service provider for email newsletters (the name is not disclosed)
New investments by #Tether💵
Tether has invested $200 million in the biotech company Blackrock Neurotech, with a Brain-Computer-Interface (chipping, etc.. it looks like a Neuralink Mask)
Against the background of such investments by Blackrock Neurotech, Tether introduced its new division Tether Evo. The division will be engaged in investing in "human-oriented" technologies.
Earlier, Tether announced a new concept for the company, and also stated that they would invest in various areas of the global economy.
It is worth noting that Blackrock Neurotech has nothing to do with the Blackrock we know.
In general, biotechnology is an interesting investment direction, and Tether only confirms this + such movements pull the company beyond the framework of stablecoins.
Euro #Tether (EUR₮) and #Tether Gold (XAU₮) To Launch on BitMart Exchange
https://tether.to/en/euro-tether-eurt-and-tether-gold-xaut-to-launch-on-bitmart-exchange/
Euro #Tether (EURT) and #Tether Gold (XAUT) To Launch on SimpleSwap
https://tether.to/en/euro-tether-eurt-and-tether-gold-xaut-to-launch-on-simpleswap/