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

Резултати

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

Пребарај: #andijan

当前筛选 #andijan清除筛选
EKOLOG.UZ| ENG

@ekologuzenglish · Post #11876 · 11.03.2026 г., 04:02

#Andijan Over the past 10 days, shepherds have brought a herd of horses and sheep onto the lands of the “Green View” farm, destroying years of tree seedlings grown on the hills of Asaka District, Andijan region. In addition, the drip irrigation systems were damaged and rendered unusable. The farmers repeatedly warned the shepherds, recorded the situation on video, and appealed to the internal affairs authorities, but no action was taken. As a result, the shepherds continue to graze their animals on the farm’s land. The farmer suffered from back pain for more than a week and, after recording the damage on video and contacting the 102 hotline, still received no response or action from the authorities. The farmers ask: Why is their labor not protected? Why is there no accountability for violations of the law? Who protects the work done to turn desert lands into green areas? They request that the Ministry of Internal Affairs of the Republic of Uzbekistan pay attention to this situation and ensure justice is served within the framework of the law. ☘️Read the latest environmental news on the @ekologuz page. Follow us and send your suggestions and wishes via @eklguz_bot Instagram | Facebook | Twitter | Sayt | Youtube.

Hashtags

EKOLOG.UZ| ENG

@ekologuzenglish · Post #11770 · 02.03.2026 г., 07:59

#Andijan The treatment of birds by staff at the Andijan Zoo has raised serious concerns. This raises an important question: do we need private zoos? The greatest risk is cruelty towards animals. In many cases, the pursuit of profit is placed above the peace and well-being of animals. ☘️Read the latest environmental news on the @ekologuz page. Follow us and send your suggestions and wishes via @eklguz_bot Instagram | Facebook | Twitter | Sayt | Youtube.

Hashtags

Andijan Development Center

@adceducate · Post #9656 · 04.08.2025 г., 15:44

❓ Ingliz tilida e’tiroz bildirishingiz kerak… Lekin qo‘pol chiqib qolishni xohlamaysiz? 👀 Bugungi mini-viktorinada aynan shuni mashq qilamiz! Qaysi variant madaniyatli va to‘g‘ri?👇 🅰️ I’m not agreeing with that 🅱️ I beg to differ 🆑 I don’t think so, and you’re wrong 💬 Javobingizni kommentariyada yozing! To‘g‘ri javob va tushuntirish — videoda! 🎥 📌 Boshqa foydali iboralarni o‘rganmoqchimisiz? Obuna bo‘ling va bizni kuzatib boring! 📞 Aloqa uchun: 📱 +998742261078 / +998994314134 📨 Telegram: @admofadc #adcenglish#ingliztili#englishquiz#andijan

Andijan Development Center

@adceducate · Post #8057 · 08.12.2023 г., 04:26

🇺🇿Поздравляем всех вас с одним из главных праздников нашей страны – «8 декабря — День Конституции Республики Узбекистан». Желаем всем Вам и Вашим близким крепкого здоровья, семейного благополучия, успехов в Вашей профессиональной деятельности и удачи во всех благих начинаниях! #adceducate#adc#andijan#tashkent#taraqqiyot#instagood#instagram#asaka#uzbekistan#adcteam#andijandevelopmentcenter#privateschool#спраздником#holiday Telegram Instagram FacebookTikTokYoutube