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

Пребарај: #aiupdate

当前筛选 #aiupdate清除筛选
ChatGPT AI Technology News

@chatgpt_officialnews · Post #96 · 07.05.2025 г., 16:16

🚨 MAJOR UPDATE + NEW NAME INCOMING! 🚨 Hey, digital explorers! Big news: your favorite Telegram AI buddy just got a mega upgrade—and it’s rocking a brand-new identity! Say hello to NeuralHubs AI 🧠⚡️ We’ve outgrown our old circuits, and this evolution is more than just a fresh coat of paint—it’s a full-on AI metamorphosis. 🦋🤖 ✨What’s new? 💡 Smarter than ever: Upgraded intelligence engine—wittier, wiser, and way more helpful. ⚡️ Blazing fast replies: Because patience is sooo pre-2024. 🌍 Multilingual mastery: Chat in your language—we now support way more of them! 🛠 Powerful new tools: From content gen to file help—we’ve got fresh tricks. 🔒 Improved privacy: Because your secrets are safe with NeuralHubs. 🤫 🎨 Sleek new interface & name: Welcome to NeuralHubs AI—your smart assistant HQ. 🧠 Why this matters: This isn’t just an update. It’s a new era. NeuralHubs AI is built to serve creators, students, thinkers, and memers alike—with intelligence that adapts to you. 📣 So next time you see the name NeuralHubs AI, just know—it’s your trusty AI pal, now upgraded and ready for greatness. ➖➖➖➖🔻 💎@Chatgpt_OfficialNews → Soon to be @NeuralHubsNews 🤖 BOT: @Chatgpt_OfficialBOT → Soon @NeuralHubsBot #️⃣#NeuralHubsAI#AIUpdate#TelegramBot#NextGenAI ➖➖➖➖🔺

ChatGPT AI Technology News

@chatgpt_officialnews · Post #21 · 05.02.2025 г., 18:51

⭐️ New Update: Personalized AI modes! ⭐️ We’re bringing you a more personalized experience with our AI bot! 🎉 Now, you can choose a mode that fits your conversation style: 🧠 Standard – Balanced responses for all types of queries. 🧑‍💻 Programmer – Get coding and technical assistance. 💖 Mia (Girlfriend Mode) – Warm, supportive, and friendly chats. 😆 Michael (Boyfriend Mode) – Caring, humorous, and engaging conversations. 🛠 How to Use? Simply type /mode and select the assistant that best suits your needs! Enjoy this new feature and let us know what you think! 🚀 ➖➖➖➖🔻 💎@Chatgpt_OfficialNews – Stay Updated! ⚡️ 🧠 BOT: @Chatgpt_OfficialBOT 📱#ChatGPT#AI#OpenAI#AIUpdate#PersonalizedChat#BotFeatures ➖➖➖➖🔺

ChatGPT AI Technology News

@chatgpt_officialnews · Post #207 · 28.07.2025 г., 20:43

🚨Major Image Update Unlocked!🚨 Our AI image generation just got faster, smarter, and more customizable! ✏️ ➕ We’ve added powerful new models and settings to give YOU more control and stunning results: 🆕 FLUX.1 [schnell] – Ultra-fast with customizable settings 🆕 Stable Diffusion – Balanced, sharp, and detailed visuals ✅ LCM (Latent Consistency Model) – Lightning-fast and lightweight 🔍Why it matters: 🎯 Generate images in under 5 seconds 🪙 Uses fewer tokens – perfect for free users 🖼 Great for artistic, stylized outputs 🔄 Ideal for rapid experimentation and high-volume image creation ➡️Whether you're building, designing, or dreaming — our new models are here to help you create faster and better than ever. Try it now and unleash your imagination! ✨ ➖➖➖➖🔻 🧠 BOT: @Chatgpt_OfficialBOT 💎@Chatgpt_OfficialNews #️⃣#AIUpdate#LCM#StableDiffusion#FLUX#NeuralHubAI#AIArt ➖➖➖➖🔺