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

Пребарај: #kton

当前筛选 #kton清除筛选
TONlines – News

@tonlines · Post #6793 · 16.04.2025 г., 10:24

⚡️The Daily TON: KTON Protocol Transformations #KTON#TON The Daily TON discusses the advancements of the KTON protocol at the Web3 Festival. Dr. Awesome Doge introduced the V2 Contract for KTON, enhancing protocol performance and liquidity management. Aiming for higher yields, KTON aspires to increase TON staking rates and expand from Asia to the USA. Source: link @tonlines

Hashtags

TONlines – News

@tonlines · Post #7434 · 29.05.2025 г., 13:08

⚡️STON.fi Introduces KTON to Enhance DeFi Experience #KTON#DeFi STON.fi has announced the integration of KTON, allowing users to stake Toncoins and receive KTON tokens. This initiative enables participants to earn rewards while engaging in DeFi activities like swaps and lending, positioning STON.fi as a leader in DeFi evolution. Source: link @tonlines

Hashtags

Venture Village Wall 🦄

@venturevillagewall · Post #3991 · 26.01.2025 г., 16:00

KTON Targets $6.12B Liquid Staking Market KTON, a liquid staking protocol by TONX, is set to launch V1 in February, aiming for a significant market expansion in the $6.12 billion liquid staking sector on TON. With Telegram's full support for TON, KTON plans to allow users to stake TON while earning KTON tokens, offering institutional-grade security. The project sees a potential growth from the current liquid staking market of $377 million to match Ethereum's levels, aiming for an 18-fold increase. KTON integrates with leading DEXs like Ethena and Curve Finance to provide flexible income strategies in the DeFi space. #KTON#TON#Staking#LiquidStaking#Blockchain#DeFi#Crypto#Institutional#Investment#Tech#Finance#Ethereum#Telegram#VC#MarketGrowth#Solana#TONX#Security#Innovation#Ecosystem