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

Резултати

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

Пребарај: #tokenrewards

当前筛选 #tokenrewards清除筛选
Airdrop Presents 🗽

@airdrop_presents · Post #2883 · 16.04.2024 г., 06:55

👽 Good news, friends! 🚀 I have something exciting to share with you today - an incredible SOAI project that I'm really looking forward to and I'm going to be involved with. Picture this: a world where AI is not just about algorithms and calculations, but about making real emotional connections. This is what SOAI is all about! Forget everything you thought you knew about chatbots and virtual assistants. SOAI is more than just a digital companion;. It is also an emotional companion to the soul. It's a whole new way to experience companionship and understand human emotions. SOAI will start pre-sale on the Solana chain on April 29. For specific pre-sale prices and sharing details, please pay attention to the SOAI official website and official Twitter account! ✅ SOAI Twitter: https://twitter.com/SOAI_web3 ✈️ SOAI Telegram: https://t.me/+j-WC1OsezTZlNTk0 SOAI official website: www.soai.org #SOAI#SoulCoin#SOAIToken#AISoulmates#EmotionalValue#TokenRewards

Crypto M - Crypto News

@CryptoM · Post #65412 · 13.04.2026 г., 06:01

🚀 Pieverse Booster Token Rewards Now Available for Claiming Binance Wallet announced on X that participants in the Pieverse Booster activities can now claim their PIEVERSE token rewards for phases 1, 2, 3, and 4. Users are encouraged to navigate to the 'Discover' section, select 'Booster,' and then proceed to 'My Total Rewards' to access their accumulated tokens. By clicking on the 'Batch Claim' option in the upper right corner, users can efficiently collect all their rewards in one go. This update marks the availability of token rewards for those who participated in the initial phases of the Pieverse Booster activities. The process is designed to streamline the claiming experience, allowing users to consolidate their rewards with ease. Participants who have engaged in these activities can now benefit from their involvement by accessing their earned tokens through the specified steps. This initiative is part of Binance's ongoing efforts to enhance user engagement and reward participation within its platform. #Pieverse#Booster#TokenRewards#BinanceWallet#PIEVERSE#ClaimRewards#UserEngagement#Cryptocurrency#Blockchain#Binance

Crypto M - Crypto News

@CryptoM · Post #64614 · 09.04.2026 г., 11:01

🚀 Binance to Launch RateX Trading Competition with Token Rewards According to the announcement from Binance, the platform is set to introduce the RateX Trading Competition on Binance Alpha. This event will take place over two distinct promotion periods, offering participants the opportunity to earn exclusive token rewards. The first promotion period is scheduled from 2026-04-09 13:00 (UTC) to 2026-04-16 13:00 (UTC), followed by the second from 2026-04-16 13:00 (UTC) to 2026-04-23 13:00 (UTC). Participants will be ranked based on their total purchase volume of RateX (RTX) tokens during each period. The top 2,040 users in each period will share a pool of 61,200 RTX tokens, with each eligible participant receiving 30 RTX tokens. Participation in the competition requires trading through Binance Wallet (Keyless) or Binance Alpha, as third-party dApp transactions are excluded. Only cumulative purchases will count, with no volume caps imposed on participants. However, token bridging transactions are not eligible. Notably, trading volume from Alpha-to-Alpha token pairs will not contribute to Alpha Points or competition rankings, effective from 2025-06-17 00:00 (UTC). Rewards will be distributed in RTX tokens and must be claimed by eligible users before 2026-05-07 13:00:00 (UTC). Unclaimed rewards within 14 days will be forfeited. To participate, users must click 'Join' on the Binance App event page, ensuring their trading volume is counted. The latest version of the Binance App and a backed-up Binance Wallet (Keyless) are required. Rankings will be calculated automatically post-promotion, and winners can claim rewards via their Binance Alpha accounts or Binance Wallet (Keyless). Binance reserves the right to amend the terms of the competition at its discretion. #Binance#RateX#TradingCompetition#TokenRewards#CryptoEvent#BinanceAlpha#RTX#TokenDistribution#BinanceWallet#TradingVolume#CryptoPromotion#TokenBridging#CompetitionRanking#AlphaPoints#BinanceApp#Keyless