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 слични објави

Пребарај: #ainft

当前筛选 #ainft清除筛选
HTX Announcements

@htxglobalannouncementchannel · Post #14511 · 12.02.2026 г., 04:52

📘Understanding #Web3 AI with #AINFT From #ChatGPT to #Claude, we break down how top #AI models work — and how AINFT unifies them on one platform.🤖 No hype. Just clarity. 🗓 12 Feb · 8AM (UTC) 📍 Venue: HTX English Telegram Group ✈️Telegram | ✖️X ✅Announcements

Crypto M - Crypto News

@CryptoM · Post #65388 · 13.04.2026 г., 04:14

🚀 AINFT Platform Surpasses 700,000 Users, Advances in Web3 AI The AINFT platform has officially exceeded 700,000 users, according to official data. According to Odaily, the growing user base and the continuous enhancement of AI model capabilities are propelling it to become a leading AI platform in the Web3 sector. AINFT currently offers users AI models ready for production and fully supports the execution of on-chain automated workflows, facilitating a rapid transition from creative ideas to on-chain implementation. Leveraging its expanding community and open technical architecture, AINFT aims to lower the barriers to using Web3 AI, enabling more efficient deployment of innovative applications. #AINFT#700000Users#Web3#AIPlatform#AI#Blockchain#OnChain#AutomatedWorkflows#Web3AI#Innovation#Technology#Community

Crypto M - Crypto News

@CryptoM · Post #64620 · 09.04.2026 г., 11:35

🚀 AINFT Transitions to B.AI Brand Focused on Agent Finance The official Twitter account of AINFT will transition to B.AI starting today. According to ChainCatcher, the B.AI brand aims to advance Agent Finance, which involves AI Agents autonomously managing funds, executing trades, and optimizing returns, thereby granting artificial intelligence true financial autonomy and accelerating the realization of Artificial General Intelligence (AGI). To ensure a smooth transition for the community, the brand will implement phased upgrades to avoid the impact of a one-time switch. During this process, AINFT will continue to operate as a core sub-brand within the B.AI ecosystem. All content, technological iterations, and community activities related to AINFT will be migrated to the new platform @AINFTcom. #B_AI#Agent_Finance#AI_Agents#Artificial_Intelligence#AGI#Technology_Transition#AINFT#Financial_Autonomy#Blockchain#Crypto