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 слични објави

Пребарај: #trmlabs

当前筛选 #trmlabs清除筛选
Venture Village Wall 🦄

@venturevillagewall · Post #4282 · 02.03.2025 г., 01:00

Bitcoin: Panic Buying Amid Market Shakeup Panic reactions in the market are evident as Bitcoin fluctuates. Key developments in the TON ecosystem include: - TVM Ventures launching a $100M fund for TON growth 🔗 - Updates from TON Core for Dec 2024 - Jan 2025 🔗 - Steve Yun discusses DeFi’s future in Telegram on CNBC 🔗 - First mid-core web3 game launched on TON 🔗 - Support program for Mini Apps initiated 🔗 - Innovations from Notcoin team highlighted 🔗 - LayerZero’s new USDT bridge enhances TON’s cross-chain capabilities 🔗 - Key investments in DeFi and SocialFi detailed by TVM Ventures 🔗 - TON’s ecosystem expands beyond major project monopolies 🔗 - TRM Labs introduces a comprehensive blockchain analysis tool for TON 🔗 - The domain believers.ton is permanently lost 🔗 #Bitcoin#DeFi#TON#Crypto#Web3#Investment#LayerZero#Blockchain#MiniApps#PanicBuying#TVMVentures#Notcoin#TRMLabs

Crypto M - Crypto News

@CryptoM · Post #64673 · 09.04.2026 г., 13:26

🚀 Drift Faces $285 Million Exploit Due to Social Engineering Tactics Drift experienced a significant exploit amounting to $285 million, attributed to suspected North Korean operatives employing in-person social engineering against its contributors. According to NS3.AI, the group targeted contributors at several major industry conferences over a six-month period leading up to the exploit. TRM Labs identified this incident as the largest DeFi hack of 2026 to date and the second-largest exploit in Solana's history. The attacker reportedly utilized CarbonVote Token to secure collateral acceptance, increase withdrawal limits, and extract assets, including USDC. #Drift#exploit#socialengineering#NorthKorea#DeFi#Solana#CarbonVoteToken#TRMLabs#USDC#cybersecurity

Crypto M - Crypto News

@CryptoM · Post #65273 · 12.04.2026 г., 13:10

🚀 Iran Reopens Strait of Hormuz with Bitcoin Toll Amid Ceasefire Iran has reopened the Strait of Hormuz under a two-week ceasefire, requiring tankers to pay a $1-per-barrel toll in Bitcoin for passage. According to NS3.AI, Hamid Hosseini stated that the system now processes 10 to 15 vessels daily, a significant decrease from the 135 vessels before the conflict. TRM Labs reported that since mid-March, Iran's military has collected up to $2 million per ship in Bitcoin, Chinese yuan, and potentially USDT. #Iran#StraitOfHormuz#BitcoinToll#Ceasefire#Tankers#NS3AI#Hosseini#TRMLabs#Military#Crypto#USDT#ChineseYuan#Shipping#Blockchain#IranEconomy#BTC