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

Резултати

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

Пребарај: #soneium

当前筛选 #soneium清除筛选
Airdrop Gold : Crypto Airdrop

@airdropgoldchannel · Post #157905 · 30.01.2025 г., 17:50

💥Simple guide on Soneium Galxe quest ✅L2 By Sony 💿 💯FREE 👇Steps 🔗https://app.galxe.com/quest/Soneium/ ✅Complete social task ✅Go to second quest page ✅Complete social task ✅Mint first day NFT ✅Mint daily NFTs ✅Claim points 💥Done #Soneium

Hashtags

TokenPocket

@tokenpocket_channel · Post #1534 · 14.01.2025 г., 09:10

💿 Soneium is now live on TokenPocket! #Soneium is a Layer 2 blockchain that empowers creators, fans, and communities to protect their rights, connect globally, and build an open internet that transcends boundaries. 💙Get started to easily create, import, and sync your #Soneium wallet on TokenPocket! 👉https://tokenpocket.pro

Hashtags

Venture Village Wall 🦄

@venturevillagewall · Post #3871 · 14.01.2025 г., 07:00

Crypto Funds Struggle Compared to Bitcoin OKX's founder Star claims no crypto fund has outperformed Bitcoin over the last decade, predicting a 100x growth for the industry. He acknowledged feedback on OKB's lack of use cases and poor listings. A new secret business line for OKX is set to launch in February. In other news, Ethereum spot ETFs saw a net outflow of $39.432 million, while Bitcoin ETFs faced a larger outflow of $284 million. Notably, BlackRock's ETHA and IBIT ETFs saw significant inflows. Read more about OKX's updates here, Ethereum's ETF activity here, and Bitcoin's ETF activity here. #OKX#Bitcoin#Ethereum#Crypto#ETFs#BlackRock#OKB#NFTs#Web3#DeFi#Soneium#S.BLOX #Blockchain#Investing#Finance#BitcoinETF#EthereumETF#VC#AI

Venture Village Wall 🦄

@venturevillagewall · Post #3870 · 14.01.2025 г., 04:00

Sony Launches Blockchain Platform Soneium Sony's public blockchain platform, *Soneium*, has officially launched on the mainnet. This initiative aims to enhance its technology offerings in the blockchain space. Read more here. In a historic move, Italy's largest bank, *Intesa Sanpaolo*, has purchased 11 bitcoins valued at around €1 million, marking the first direct crypto transaction by a financial institution in Italy. Details can be found here. FTX/Alameda has redeemed and transferred 182,421 SOL (approx. $32.35M) today, raising the total since last November to 4.445M SOL (approx. $516.88M). The staked address currently holds 6.47 million SOL (approx. $1.18B). More information here. The US Court of Appeals ruled in favor of *Coinbase* in its case against the SEC, deeming the SEC's denial of rulemaking as “arbitrary and capricious.” This case revolves around establishing rules for digitally native asset securities. For further reading, click here. #Sony#Blockchain#Soneium#Bitcoin#ECB#Italy#IntesaSanpaolo#CryptoTransactions#FTX#SOL#Coinbase#SEC#DeFi#DigitalAssets#Cryptocurrency#Finance#Investing#VentureCapital#CryptoNews#CryptoMarket