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

Резултати

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

Пребарај: #cryptoevent

当前筛选 #cryptoevent清除筛选
UXLINK

@uxlink_community · Post #223 · 27.01.2025 г., 05:08

설날 맞이 UXLINK 한국인 홀더 이벤트 🔥 $10,000 (100 USDT x 100명) 📅 1/27~ 2/10 16:00까지 #UXLINK 홀더 인증, 응원글 및 로고 작성 후 #UXLINKEVENT 태그 달아 올리면 끝! 💡 홀더 인증하고 새뱃돈 가져가자! 👉 홀더라면 참여하지 않을 수 없는 이벤트! https://forms.gle/rntCL5CYSsDRGwgE7 #UXLINK#UXLINKEVENT#CryptoEvent#FreeRewards

UXLINK

@uxlink_community · Post #48 · 21.11.2024 г., 02:01

UXLINK"를 찾아라 이벤트 🔥 5,000 USDT + 100,000 UXUY 쏜다! (700만 원 상당💸) 📅 11/21 ~ 12/20 #UXLINK 광고 찍고 #UXLINKEVENT 태그 달아 올리면 끝! 💡 UX Wallet 제출하면 당첨 확률 UP 👉 지금 참여 안 하면 NGMI! https://forms.gle/mwdapWAhV2WDcmFF7 #UXLINK#UXLINKEVENT#CryptoEvent#FreeRewards

SLEX NEWS

@slex_io · Post #88 · 11.09.2023 г., 07:21

🚀Exciting News for SLEXians! 🚀 ✨We're thrilled to announce that the SLEX platform will be a part of the outstanding Token2049 event in Singapore on September 13-14! 🌏 🌐Token2049 is a premier crypto and blockchain conference that brings together industry leaders, innovators, and enthusiasts worldwide. It's a hub for networking, knowledge-sharing, and staying ahead of the latest trends in the crypto space. 👥We invite our community members to join us at the event, either in person or virtually, to learn more about the SLEX platform features and engage with fellow crypto enthusiasts. 💫Save the dates, and let's make this event memorable together!🗓️ #SLEX#Token2049#CryptoEvent#CryptoTrading#Blockchain#Singapore Email | Telegram | Reddit | Facebook | Instagram | Medium | Linkedin | Twitter

Crypto M - Crypto News

@CryptoM · Post #65451 · 13.04.2026 г., 09:17

🚀 GENIUS Airdrop Opens on Binance Alpha: 240 Tokens for Users With 230+ Alpha Points According to Binance Wallet's post on X, Binance Alpha will debut Genius Foundation (GENIUS) on April 13, 2026, at 11:00 UTC, making it the first platform to list the token. Users holding at least 230 Binance Alpha Points may claim a 240-GENIUS airdrop on a first-come, first-served basis; claiming consumes 15 Alpha Points. If the reward pool remains undistributed, the points threshold automatically drops by 5 every 5 minutes. Claims must be confirmed on the Alpha Events page within 24 hours or are forfeited. #GENIUSAirdrop#BinanceAlpha#GeniusFoundation#Airdrop#Crypto#AlphaPoints#Binance#Token#Blockchain#CryptoEvent

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