TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #60 · 31 мар.

Вторая по частоте future-функция, которую я использовал, это абсолютный импорт from __future__ import absolute_import Что она делает? Изменения, которые вносит эта инъекция описаны в PEP328 Покажу простой пример. Допустим, есть такой пакет: /my_package /__init__.py /main.py /string.py Смотрим код в my_package/main.py # main.py import string Простой пример готов) Вопрос в том, какой модуль импортируется в данном случае? Есть два варианта: 1. модуль в моём пакете my_package.string 2. стандартный модуль string И вот тут вступает в дело приоритет импортов. В Python2 порядок следующий: помимо иных источников, раньше ищется модуль внутри текущего пакета, а потом в стандартных библиотеках. Таким образом мы импортнём my_package.string. Но в Python3 это поведение изменилось. Если мы указываем просто имя пакета, то ищется именно такой модуль, игнорируя имена в текущем пакете. Если мы хотим импортнуть именно подмодуль из нашего пакета то, мы должны теперь явно это указывать. from my_package import string или относительный импорт, но с указанием пути относительно текущего модуля main from . import string Еще одной неоднозначностью меньше 😎 Подробней про импорты здесь: https://docs.python.org/3/tutorial/modules.html #2to3#pep#basic

Резултати

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

Пребарај: #fastai

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

@chatgpt_officialnews · Post #49 · 19.03.2025 г., 14:59

🚀Say Hello to GPT-O3 Mini – Small but Mighty!🧠💡 Need a lightweight AI that’s still smart? GPT-O3 Mini is your go-to choice! ⚡️🎯 ✨What makes it great? 🟢 Super Fast – Perfect for quick chats & short tasks! 🟢 Energy Efficient – Uses minimal resources but delivers big! 🟢 Great for Simple Tasks – Ask questions, get answers, and enjoy AI on the go! 💡How to use it? Simply type: 🔹 /model – Select GPT-O3 Mini for a fast & smooth AI experience! 🔹 Need help? @OpenAI_helpdesk 🔹 Join the discussion: https://t.me/chatgpt_officialchat 🔥 Try GPT-O3 Mini now and enjoy AI in its lightest form! ➖➖➖➖🔻 💎@Chatgpt_OfficialNews – Stay Updated! ⚡️ 🧠 BOT: @Chatgpt_OfficialBOT #️⃣#GPT#GPT-O3Mini #FastAI#LightweightAI#SmartTech ➖➖➖➖🔺

ChatGPT AI Technology News

@chatgpt_officialnews · Post #48 · 18.03.2025 г., 15:59

🚀 Meet GPT-O1 – The Fast & Reliable AI! 🤖 ⚡️ Looking for a quick, efficient AI for everyday tasks? GPT-O1 is here to help! 🧠💡 ✨What can it do? ✅ Fast & Lightweight – Get instant answers without delays! ✅ Smart & Efficient – Perfect for casual chats, summaries, and quick responses. ✅ Low-latency AI – Works seamlessly even on lower-end devices. 💡How to use it? Simply type: 🔹 /model – Select GPT-O1 for speed & efficiency! 🔹 Need help? @OpenAI_helpdesk 🔹 Join the discussion: https://t.me/chatgpt_officialchat 🔥 Try GPT-O1 now and experience smooth AI interactions! ➖➖➖➖🔻 💎@Chatgpt_OfficialNews – Stay Updated! ⚡️ 🧠 BOT: @Chatgpt_OfficialBOT #️⃣#GPT#GPT-O1 #FastAI#SmartChat#AI#NextGen ➖➖➖➖🔺

ChatGPT AI Technology News

@chatgpt_officialnews · Post #50 · 20.03.2025 г., 04:36

📱Google:"Hey guys, wait for us! We have an AI chatbot too… it’s just not ready yet!" 📱GPT-4 gang:Silence. Judging. Side-eyes. 📱GPT-4 gang:Unanimous rejection with the ultimate thumbs-down 📱Google:Left standing like a kid who brought a calculator to a sword fight AI wars are brutal—either you launch big or get left behind! 📇Share ➖➖➖➖🔻 💎@Chatgpt_OfficialNews – Stay Updated! ⚡️ 🧠 BOT: @Chatgpt_OfficialBOT #️⃣#GPT#Fun#FastAI#SmartTech#Meme#Joke ➖➖➖➖🔺