Вторая по частоте 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
📊📊Can Circle handle the $USDC withdrawal on Monday when the banks are open? Let's review some stats
➡️CEX USDC Balances: total 7.189B
Top 3:
1. #Binance : 5.16B
2. #cryptocom: 785M
3. #Okx: 421M
➡️Netflow to CEX is also increasing over the hours in the past 2 days.
Dune link:https://dune.com/spotonchain/spotonchain-cex-usdc-flow
😎 Trump launches #ETF without #Coinbase
Trump Media has announced a partnership with Crypto.Com to launch the #ETF line, it will include cue ball and “pro—American” assets, all under the “Made in America” brand
Why #CryptoCom was chosen, and not #Coinbase — through which $529,325BTC has already passed in an ETF — remains a question.
Bitcoin Drops Below $97,000
Bitcoin fell below $97,000 during the night. Liquidation volumes topped $625 million within 24 hours. In Kazakhstan, regulators have blocked over 3,500 illegal crypto exchanges, including Coinbase, for violating digital asset laws. On January 7, the Bitcoin spot ETF net inflow reached $52.39 million, while BlackRock's ETF IBIT saw $596 million in inflow, bringing the total net asset value of Bitcoin spot ETFs to $110.115 billion. Additionally, a large transfer of 250,080,000 #CRO ($36.78M) was made from #CryptoCom to an unknown wallet.
#Bitcoin#Crypto#Kazakhstan#ETF#CRO#CryptoCom#WhaleAlert#Finance#MarketUpdate#Liquidation#News#Blockchain#Regulators#Assets#Investment#DigitalAssets#CryptoNews#MarketTrends#CryptoExchange#CryptoRegulation
Major Crypto Movements and Developments
🚨 1,823,409 #SOL ($274M) transferred to Coinbase Institutional. Whale Alert details multiple transfers.
ANTHROPIC achieves $61.5B valuation; former FTX stake now worth $5B.
Michael Saylor predicts Bitcoin market cap could reach $20-$200 trillion. His company paused BTC purchases; only 904 BTC away from 500,000 total.
ZKnox launches with Ethereum Foundation support, focusing on post-quantum cryptography to enhance Ethereum security.
Congressmen Emmer & Torres establish 'Congressional Crypto Caucus' for pro-crypto legislation.
Crypto.com’s Cronos protocol debates reissuing 70B burned CRO tokens; community vote shows over 86% against the proposal.
Links: ZKnox Launch, Cronos Proposal
#SOL#Bitcoin#Crypto#AI#Ethereum#ZKnox#Congress#Legislation#Caucus#ANTHROPIC#FTX#CRO#CryptoCom#PostQuantum#Security#Efficiency#Strategy#NFT#DeFi#MarketCap