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

Резултати

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

Пребарај: #omniconnect

当前筛选 #omniconnect清除筛选
TON Crypto News

@toncoin_rap · Post #179 · 27.09.2024 г., 13:50

🎧⤴ ✈️Telegram’s Billion Users Set to Enter Web3 with Bitget’s OmniConnect – Game-Changer for Blockchain Integration Bitget Wallet has launched OmniConnect, an SDK that allows Telegram’s Mini-Apps to interact with 500+ blockchains, including Solana, TON, and EVM-compatible networks. ► Full News (Expand) Chorus: Bitget’s the key, unlocking the gate, Telegram flows, Web3’s our fate. From Solana to EVM, we transcend, Blockchain’s the wave, no need to pretend. Verse 1: OmniConnect dropped, it’s a brand new day, Telegram’s Mini-Apps leading the way. A billion strong, ready to dive, In this Web3 world, we’re coming alive. No more limits, chains unite, Solana, TON, now feeling the hype. Transactions smooth, signatures signed, Blockchain’s the future, leave doubt behind. Chorus: Bitget’s the key, unlocking the gate, Telegram flows, Web3’s our fate. From Solana to EVM, we transcend, Blockchain’s the wave, no need to pretend. Verse 2: Dev tools stacked, the future’s bright, Mini-Apps thrive, in multichain flight. From gasless trades, to bots that scale, Bitget’s moves, you know they won’t fail. August came, with millions onboard, Global downloads, breaking the cord. Secure logins, Google and Mail, This is the story, we’re here to prevail. Chorus: Bitget’s the key, unlocking the gate, Telegram flows, Web3’s our fate. From Solana to EVM, we transcend, Blockchain’s the wave, no need to pretend. Verse 3: Trading in wallets, social connect, No gas fees now, what you expect? The ecosystem’s growing, feel the rise, Web3’s here, open your eyes. Devs are building, ready to soar, Bitget’s tools open the door. From DeFi to games, there’s no divide, With OmniConnect, it’s a global ride. Chorus: Bitget’s the key, unlocking the gate, Telegram flows, Web3’s our fate. From Solana to EVM, we transcend, Blockchain’s the wave, no need to pretend. Bridge: We’re bridging the chains, we’re crossing the lines, Telegram’s power in these modern times. A billion users, ready to fly, Web3’s calling, the limit’s the sky. #Web3Adoption#OmniConnect#BitgetWallet #TONCryptoNewsRapStyle 🎧@toncoin_rap