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

Резултати

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

Пребарај: #web3festival

当前筛选 #web3festival清除筛选
DWF Labs Broadcast

@DWFLabs · Post #1121 · 10.04.2025 г., 05:05

#Web3Festival in Hong Kong wrapped up during a tough week for the crypto market, but builder momentum was high and the community remains active 🔥 Announcements such as TON Blockchain's TON wallet expanding into the U.S. and events hosted by Monad and BNB Chain indicate that the space is still moving forward. For a recap on highlights from this past week, read the DWF Ventures team's summary here. DWF Ventures continues to support teams building through every cycle. If you're working on something, get in touch: https://www.dwf-labs.com/ventures

DWF Labs Broadcast

@DWFLabs · Post #594 · 11.04.2024 г., 02:59

During our week at #Web3Festival in Hong Kong, Eugene Ng, Founding Partner of DWF Labs, gave a talk on the mainstage about the newest trends and narratives in Web3 innovations. He discussed the rise of Bitcoin ecosystems, the institutionalisation of crypto as an asset class; memecoins, AI and more. 💥 Missed his speech? Check out the livestream recap.

DWF Labs Broadcast

@DWFLabs · Post #587 · 10.04.2024 г., 09:05

#Web3Festival was a successful week, and we especially enjoyed our side event, DWF Labs Haus, on Sunday night. 🌙 It was an evening of delicious cocktails and canapés, fantastic company, and insightful conversations. Thank you to everyone who came!

DWF Labs Broadcast

@DWFLabs · Post #577 · 10.04.2024 г., 03:02

During #Web3Festival Hong Kong, our team was able to share insights about innovations that are heating up in the crypto space. 🔥 Yesterday, Fiona Ma, Senior Associate at DWF Ventures, gave a speech about decoding the Ethereum restaking landscape, delving into the evolution from staking to restaking. Restaking is one of the verticals DWF Ventures is highly interested in - if you're a project innovating in multiple sectors, feel free to reach out to their team on X!

DWF Labs Broadcast

@DWFLabs · Post #573 · 09.04.2024 г., 09:01

Our team had an amazing time at #Web3Festival in Hong Kong! It was our second year sponsoring Web3 Festival, and this year was even bigger and better than the last. 🔥 It was a pleasure to meet our friends and partners in person at our booth. Thank you to everyone who came by!

DWF Labs Broadcast

@DWFLabs · Post #569 · 08.04.2024 г., 07:50

About last night... 👀 That's a wrap on our event, DWF Labs Haus, during #Web3Festival Hong Kong. 🔥 Meeting industry leaders, founders, and innovators in person is always a pleasure as we continue to work from a diverse network of cities and countries worldwide. Thank you to everyone who attended, it was great to meet you all!

DWF Labs Broadcast

@DWFLabs · Post #566 · 07.04.2024 г., 09:10

Setting up for our DWF Labs Haus event during #Web3Festival, which kicks off at 6 PM. 👀 We're in full swing gearing up to host an unforgettable evening filled with incredible networking opportunities and delicious cocktails and canapés. Looking forward to meeting everyone soon!

DWF Labs Broadcast

@DWFLabs · Post #506 · 05.02.2024 г., 09:48

The teaser for Hong Kong #Web3Festival 2024 just dropped! We're excited to be Title Sponsors of this event ✨ Get ready for this spectacular gathering of #Web3 set for April 6-9 🔥 Get February offer: https://lu.ma/hkweb3festival2024

NEWS 鏈新聞-ABMedia

@abmedia_news · Post #24295 · 02.05.2026 г., 05:27

【🔒 資訊安全|剛找 AV 女優辦擦邊派對!Web3 Festival 贊助商 Websea 疑似活動後 36 小時跑路】 #Websea#Web3Festival#瀧澤蘿拉 交易所 Websea 與營運長 Herbert Sim 在 4 月 21 日辦完活動後,遭爆疑似限制提領並關閉 C2C 通道。 該平台主打湧盈基金與保本跟單,但在 Safe S[C]EX Night 結束後,出現 USDT 五折拋售與客服失聯。華麗行銷背後查無 PoR 儲備資料 — 高風險資金結構恐已進入崩潰。 📍閱讀全文: https://abmedia.io/web3-festival-websea-av-exchange 📍 訂閱鏈新聞頻道:https://linktr.ee/abmedia.io

🌎TONCA$H Travel Cashback is ON! Planning to hit Hong Kong #Web3Festival or Dubai #Token2049? Why not earn cashback in $BTC, $TON, or $USDT when booking your trip? Hot Deals: ⚡️ 10% cashback on flights🛬 ⚡️ 20% cashback on hotels📍 How to Claim? ✅ Book your trip via TONCash App ✅ Receive your cashback in $BTC, $TON, or $USDT directly in your wallet! T&Cs apply 💵Get Your Place Now!🏝 #TONCash#Travel#Web3#HongKongWeb3Festival#DubaiToken2049#Cashback