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

Резултати

Пронајдени 2 слични објави

Пребарај: #cryptoderivatives

当前筛选 #cryptoderivatives清除筛选
Crypto M - Crypto News

@CryptoM · Post #64629 · 09.04.2026 г., 12:04

🚀 Tokenized Perpetual Swaps Reach $30.7 Billion in Weekly Volume Tokenized perpetual swaps linked to traditional assets have seen significant growth, reaching a weekly volume of $30.7 billion by the end of March, according to NS3.AI. This figure represents 1.72% of the total crypto derivatives market. The surge was primarily driven by commodities, with total weekly volume across these contracts peaking at $54.5 billion during the metals rally in February. #TokenizedSwaps#PerpetualSwaps#CryptoDerivatives#Commodities#MetalsRally#CryptoTrading#NS3AI#WeeklyVolume#FinancialMarkets#DigitalAssets

Crypto M - Crypto News

@CryptoM · Post #64776 · 09.04.2026 г., 22:11

🚀 CFTC and DOJ Legal Actions Could Influence Future of Prediction Markets The Commodity Futures Trading Commission (CFTC) and the Department of Justice (DOJ) have initiated legal proceedings against the states of Arizona, Connecticut, and Illinois concerning their actions against CFTC-registered prediction markets. According to NS3.AI, a recent 2-1 ruling by the Third Circuit Court upheld an injunction preventing New Jersey from applying its gambling laws to Kalshi, a prediction market platform. The court determined that Kalshi's contracts related to sports events are classified as swaps under the Commodity Exchange Act, thereby falling under the exclusive jurisdiction of the CFTC. This legal dispute has the potential to significantly influence the regulatory framework for decentralized prediction markets and crypto-native derivatives across the United States. #CFTC#DOJ#PredictionMarkets#Kalshi#CommodityExchangeAct#Regulation#CryptoDerivatives#USLaw#LegalActions#DecentralizedFinance