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

Пребарај: #makeadifference

当前筛选 #makeadifference清除筛选
NewUU Student Council

@newuu_sc · Post #1460 · 08.02.2025 г., 07:37

🌍 SDG Week: The SDG Nexus – Connecting People and Purpose 🌱 Get ready for an inspiring journey towards a sustainable future! 🌏✨ Join us at Webster University in Tashkent for SDG Week, where you’ll engage with global experts, take part in interactive workshops, and explore how YOU can make a difference in achieving the Sustainable Development Goals. 📆Date: February 10-12 📍Location: Webster University in Tashkent 🕛Time: 12:00 p.m. What to Expect? 📅Day 1: Opening Conference & Networking 🎤 Kick off SDG Week with a powerful conference featuring 5 international universities, a United Nations representative, and leading experts in the field of SDGs. 🤝 Connect with like-minded individuals passionate about sustainability and change. 📅Day 2: Eco Health & Sport Day 🌱 Learn from eco-activist Urikguli (Mutabar Xushvaqtova) in an engaging workshop on environmental sustainability and its impact on our well-being. ⚽ The session will be followed by exciting sports matches to promote health and sustainability. 📅Day 3: Hands-On Workshops & Action Planning 💡 Dive deeper into real-world solutions through interactive workshops, where you’ll develop actionable strategies to contribute to sustainable development. 🍕Special snacks will be provided between networking sessions!🤫 🚀Want to actively contribute to the event? If you have an idea, project, or expertise related to the SDGs and would like to be a part of the program as a speaker, organizer, or contributor, fill out this form: 📢Contribute to SDG Week:https://forms.gle/ReaaTpPMP5W41KwW8 🔗Register as a participant:https://forms.office.com/r/QVFg4ZFZy8?origin=lprLink 📢Join the SDG Club:https://t.me/sdgclubwebster #SDGWeek#SustainableDevelopment#MakeADifference#PeopleAndPurpose

INHA University in Tashkent

@inha_uz · Post #8528 · 20.01.2025 г., 12:05

🌟 Join Us in Supporting the Children’s Hospice! 🌟 🗓Date: 25th of January 📍 Gathering Point: INHA University at 9:00 AM This event is dedicated to bringing love, care, and support to children in the hospice during their most challenging times. Let's come together to make a difference in their lives! ❤️ Your contributions and time as a volunteer can truly bring hope and smiles. 💬How to Help: ✅ Donate: Every little contribution matters 9860 3501 4923 6621(Aleksandra Kim) ✅ Volunteer: Be part of this meaningful event. For more details: @iut_charityy Let’s create a wave of kindness and show these children that they are not alone! 💕 #CharityEvent#ChildrenHospice#Volunteer#IUTCharity#MakeADifference

Real Eco Committee

@real_eco · Post #4 · 15.04.2026 г., 07:56

🌱 Join our Eco Committee! Want to make a real difference for the environment? 🌍💚 If you're interested in being part of our project, come to our Thursday school eco volunteering meeting! Let’s work together for a greener future 🌿✨ #EcoCommittee#EcoClub#GoGreen#Sustainability#SaveThePlanet#EcoFriendly#SchoolLife#Volunteer#ClimateAction#GreenFuture#EnvironmentalAwareness#ActNow#StudentsForChange#MakeADifference#EcoWarriors