Вторая по частоте 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
Золотым ETF от BlackRock потребовалось 20 лет, чтобы достичь $33 млрд AUM
а его BTC-ETF (#IBIT) потребовалось меньше года, чтобы достичь и почти в 2 раза превысить эту отметку
❗️BTC-ETF - cамые быстрорастущие ETF в истории.
💎Перелив капитала из Золота в BTC?
JPMorgan: C начала войны на Ближнем Востоке – в крупнейшем спотовом ETF на Золото (#GLD) зафиксирован отток капитала в размере около 2,7%, в то время как в крупнейшем спотовом ETF на Биткоин (#IBIT) наблюдается приток в размере 1,5%.
Crypto Headlines
BlackRock выкупил все BTC, проданные Grayscale с момента запуска BTC-ETF
Приток BlackRock (#IBIT) = +$13,1 млрд
Отток Grayscale (#GBTC) = -$13,3 млрд
Теперь BlackRock владеет более чем 1% от 21 млн BTC
⚡️ .The American stock market lost almost 2 trillion dollars just 15 minutes after the opening of trading
There is a major collapse in all global stock markets, what happened:
• It all started with Japan: the Nikkei 225 stock index (a key indicator that includes shares of 225 of Japan's largest companies) collapsed by 12.4%, setting a record since 1987 — all due to the deterioration of economic data in the United States, which made investors fear a recession in the country's economy
• The Istanbul Stock Exchange announced the termination of trading after the decline of the main Borsa Istanbul 100 index (BIST 100) by 6.72%
• South Korea's Kospi index is down 8.1%, China's Shanghai Composite index is down 0.9%, Hong Kong's Hang Seng is losing 1.8%, and Australia's S&P/ASX 200 is down 3.5%
• The Bitcoin exchange rate drops below $50,000, losing almost 20% of its value in 2 days
• The Ether rate sank even more — a decrease of more than 20% per day
• The American stock market loses 1,900,000,000,000 dollars after the opening of trading
The trading volume of spot #BTC-#ETF#BlackRock#IBIT in the first hour amounted to $1.45 billion.
BlackRock Introduces Bitcoin ETF to Portfolios
BlackRock includes Bitcoin in its $150B model portfolios, committing 1-2% to the iShares Bitcoin Trust ETF (IBIT). This strategic allocation opens new demand for financial advisors. Despite recent market fluctuations, this could signal increased institutional interest in Bitcoin.
🔗Read more here
#Bitcoin#BlackRock#ETF#IBIT#Finance#Investing#MarketTrends#AI#Crypto#VC
#Bitcoin#BlackRock#ETF#IBIT#Finance#Investing#MarketTrends#AI#Crypto#VC
Nasdaq Proposes Huge Options Limit Increase
Nasdaq seeks to raise position and exercise limits for iShares Bitcoin Trust ETF (IBIT) options from 25,000 to 250,000 contracts. Awaiting SEC's approval or denial.
#Nasdaq#Bitcoin#ETF#IBIT#Options#SEC#Crypto#VC