TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #197 · 4 јан.

Подразумеваемые неймспейсы или неявные пакеты. Этот функционал добавлен в Python 3.3 Что он означает? Ранее, до 3.3 пакетами считались лишь директории, в которых есть файл __init__.py. Этот файл одновременно являлся свидетельством того, что директория это Python-пакет, и служил "телом" этого пакета. То есть местом, где можно написать код, как это делается внутри модуля. Этот код исполняется в момент импорта пакета, так что его принято называть "код инициализации пакета". Начиная с версии 3.3 Любая директория считается пакетом и Python будет пытаться использовать любую директорию для импорта. Конечно, не любую в файловой системе, а только те что находятся в sys.path. Это значит, что теперь __init__.py нужно делать только если: 🔸 вам требуется создать код инициализации пакета 🔸 нужна совместимость со старыми версиями Python На мой взгляд это немного упрощает разработку, делает её чище, но с другой стороны убивает некоторую однозначность происходящего. Например, я создал репозиторий со своей библиотекой и рядом положил код примеров или тестов. repo_name/ my_library/ __init__.py main.py examples/ exam1.py exam2.py В этом репозитории пакетом является только my_library, остальные директории это не пакеты, это просто дополнительный код в файлах. Директория examples не добавлена в sys.path, в ней нет рабочих модулей. Но если она лежит рядом с my_library, то Python вполне сможет импортнуть из неё модули, так как посчитает что examples это валидный пакет. Конечно, пример несколько надуманный. Никто не будет добавлять корень репозитория в sys.path. Но, я думаю, суть ясна. Иногда директория это просто директория а не пакет! #basic#pep

Hashtags

Резултати

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

Пребарај: #web3adoption

当前筛选 #web3adoption清除筛选
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

Gumart Announcement 🛒

@gumartec · Post #244 · 15.04.2025 г., 07:23

🎬 Gumart is in Paris Blockchain Week 2025 🇫🇷 #GuGoGlobal campaign – a journey to take Gumart around the world and bring Web3 adoption closer to real life! 📍 First Stop: Paris Blockchain Week 2025 Our team just landed in Paris, the heart of innovation and fashion, to showcase Gumart at one of the most prestigious Web3 events in the world! From networking with top-tier founders and VCs to sharing the stage with the best builders in the space, Gumart is here to make waves. 🎥👉 Watch the highlight video from our Paris mission – and feel the energy! 💡We’re on a mission to show the world how Gumart is building the future of crypto payments, e-commerce, and DeFi — one region at a time. Real people. Real places. Real utility. 🚀 Next stop? Maybe your city. Don’t blink 👀 Let’s take Web3 mainstream – together 🌐 #GuGoGlobal#Gumart#PBW2025#Web3Adoption#ParisBlockchainWeek#CryptoInRealLife